Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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='',
select mail_result; --> 0
mail_result=call xp_sendmail(recipient='',

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

asked 11 Jun '13, 11:35

Jaak%20Thijs's gravatar image

Jaak Thijs
accept rate: 50%

edited 11 Jun '13, 11:37

Mark%20Culp's gravatar image

Mark Culp

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
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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 11 Jun '13, 11:35

question was seen: 2,619 times

last updated: 11 Jun '13, 11:44