on 2013 Mar 04 5:27 AM
[SQL Anywhere 12.0.1.3810]
The xp_startsmtp procedure supports two parameters 'smtp_auth_username' and 'smtp_auth_password', which allow it to work with SMTP servers that require authentication.
I've been testing this against the free 'hMailServer' mail server and have found that the parameters do work but only if the server is set to 'Allow plain text authentication' (which it isn't by default).
Looking at the SMTP logs and doing some reading (e.g. here), I now understand that there are several different types of SMTP authentication around: LOGIN, PLAIN and CRAM-MD5 (and possibly others?). The default for hMailServer is simply LOGIN, which causes xp_startsmtp to return 104. Ticking the 'Allow plain text authentication' tickbox adds PLAIN support at which point xp_startsmtp returns success. I haven't found a way of enabling CRAM-MD5 with hmailserver so don't know whether this will work with xp_startsmtp.
Can anyone tell me which forms of SMTP authentication are supposed to be supported by SQL Anywhere?
For reference, the command I have been testing with is of the form:
BEGIN DECLARE li_result integer; li_result = CALL xp_startsmtp( smtp_sender = 'testsender@testdomain.co.uk' , smtp_server = '10.200.42.40' , smtp_port = 25 , timeout = 60 , smtp_auth_username = 'test@testpc.testdomain.co.uk' , smtp_auth_password = 'test' ); SELECT li_result; END
Request clarification before answering.
At the moment we only support PLAIN authentication. We are investigating adding other forms of authentication in future versions of SQL Anywhere.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are a number of command line mail programs (eg Blat) available that you could use with xp_cmdshell()
FWIW: Frank, I have just converted your postings from "answers" into comments, as I think they are not actual answers. You can do that yourself by using the "add new comment" button beneath each question/answer or by using the "reply" button (second symbol from right) beneath each comment (for nested comments).
Hi Frank - unless someone from SAP is able to say otherwise, it's unlikely that new authentication types are going to be added to existing versions - new features tend to come with major version releases rather than ebfs (not always, but usually).
If that is the case, I think your possible workarounds are limited to using a mail server with will accept an authentication method compatible with what the SQL Anywhere server can do (which doesn't sound practicable for you), or using another method of sending the emails. However someone may have a cleverer idea!
User | Count |
---|---|
61 | |
8 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.