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 Sybase 10 I am not able to establish SMTP Session. I receive always the error code 503 (Bad sequence of commands), when I call: select xp_startsmtp('mayname@mycompany.com', 'our_email_server_url', 25, 60, 'my_name', 'myname@mycompany.com', 'my_pwd') from dummy!! Could anyone help?

asked 07 May '18, 10:01

Baron's gravatar image

Baron
2.1k136149177
accept rate: 48%


This is a stored procedure, not a stored function, so I recommend to use

CALL retCode = xp_startsmtp(...);

instead of using SELECT ...

Not sure whether that explains your error.

permanent link

answered 07 May '18, 10:26

Volker%20Barth's gravatar image

Volker Barth
40.2k361549822
accept rate: 34%

edited 07 May '18, 10:27

I recieve the same error code (503) even when I call it as: begin declare retCode int; set retcode = xp_startsmtp(...); message (retcode); end

(07 May '18, 10:35) Baron
Replies hidden

What is the exact error message? I'm not firm with SMTP but 503 could mean several errors, such as missing authentication.

FWIW, do you really mean 'mayname@mycompany.com' vs. 'myname@mycompany.com'?

(07 May '18, 11:22) Volker Barth

Yes, sorry for misstyping. I mean myname@mycompany.com. which I used for the first and sixth parameter. Error code 503 means according to the documentation 'bad sequence of commands'!! Does this mean bad sequence of parameters? althgough I am using the correct order and correct number of parameters.

(07 May '18, 15:01) Baron

Is it meant with 503 (bad sequence of PARAMETERS)? when it is meant bad sequence of COMMANDS, then should this statement be preceeded with another statements and/or commands?

(08 May '18, 16:52) Baron
Replies hidden

No, in my (limited) understanding it means that something is wrong with authentification, e.g. when the SMTP server does not expect authentication.

If you can test with v16 or v17, there's better error handling via the additional xp_get_mail_error_code()/xp_get_mail_error_text functions.

(09 May '18, 03:19) Volker Barth
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:

×4

question asked: 07 May '18, 10:01

question was seen: 1,311 times

last updated: 09 May '18, 03:19