cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Email from SQL Anywhere Database

0 Kudos

I am trying to send the results of a query in an email. I need to use two functions to do this. First, I need to call the xp_startsmtp function, and then I can use the xp_sendemail function and specify whom I would like to send the email to.

The xp_startsmtp function requires two parameters, but I do not know what information I should put.

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.sqlanywhere.12.0.1/dbreference/xp...

Accepted Solutions (0)

Answers (1)

Answers (1)

chris_keating
Advisor
Advisor

The arguments seem to be self explanatory, The first argument is valid email address for the SMTP mail server. The second argument is the SMTP server. For example, sending mail via the email account user user@mail.com would call something like:

call xp_startsmtp( 'user@mail.com', 'smtp.mail.com' )

(Prior post used gmail SMTP but this no longer works reporting SMTP code 6.)

0 Kudos

Thank you Chris. You have answered both of my questions, and I appreciate it