On some PC's, i get an error on xp_sendmail. On other PC's it works fine. What can be the problem ?
create or replace variable mail_result int; mail_result = call xp_startsmtp(firstname.lastname@example.org', smtp_server='192.168.167.252', smtp_port=25,smtp_sender_name='abc'); select mail_result; --> 0 mail_result=call xp_sendmail(email@example.com', subject='test',"message"='test', content_type='ASIS');
select mail_result; --> error code 5 I Use Sql Anywhere 22.214.171.12436
Error code 5 indicates that the xp_sendmail() call could not connect to the SMTP server. See this page for the list of error codes (this is from the SA 16 docs but v12 has the same codes).
Check that your computer (where it is failing) does not have a firewall that is blocking outgoing connection to port 25. In particular check the Windows Firewall rules and if you have a virus scanner (or other software that 'protects' your computer) then be sure that you check it as well. For example, McAfee software is known to block outgoing connections to port 25.
answered 11 Jun '13, 11:44