[SQL Anywhere 126.96.36.19910]
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 = 'email@example.com' , smtp_server = '10.200.42.40' , smtp_port = 25 , timeout = 60 , smtp_auth_username = 'firstname.lastname@example.org' , smtp_auth_password = 'test' ); SELECT li_result; END
asked 04 Mar '13, 05:27
At the moment we only support PLAIN authentication. We are investigating adding other forms of authentication in future versions of SQL Anywhere.
answered 04 Mar '13, 09:05