Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

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(smtp_sender='test1@fromcompany.nl',
                                smtp_server='192.168.167.252',
                                smtp_port=25,smtp_sender_name='abc');
select mail_result; --> 0
mail_result=call xp_sendmail(recipient='test2@tocompany.nl',
                             subject='test',"message"='test',
                             content_type='ASIS');

select mail_result; --> error code 5 I Use Sql Anywhere 12.0.1.3436

asked 11 Jun '13, 11:35

Jaak%20Thijs's gravatar image

Jaak Thijs
131479
accept rate: 50%

edited 11 Jun '13, 11:37

Mark%20Culp's gravatar image

Mark Culp
25.0k10142298


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.

permanent link

answered 11 Jun '13, 11:44

Mark%20Culp's gravatar image

Mark Culp
25.0k10142298
accept rate: 41%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×13
×10

question asked: 11 Jun '13, 11:35

question was seen: 2,722 times

last updated: 11 Jun '13, 11:44