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(email@example.com', smtp_server='192.168.167.252', smtp_port=25,smtp_sender_name='abc'); select mail_result; --> 0 mail_result=call xp_sendmail(firstname.lastname@example.org', subject='test',"message"='test', content_type='ASIS');
select mail_result; --> error code 5 I Use Sql Anywhere 18.104.22.16836
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