The forum will be down for maintenance at some point from Friday, November 16 at 19:00 EDT until Sunday, November 18 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.

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, 10:01

Sarkis's gravatar image

Sarkis
300192337
accept rate: 0%


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, 10:26

Volker%20Barth's gravatar image

Volker Barth
32.4k328476692
accept rate: 32%

edited 07 May, 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, 10:35) Sarkis
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, 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, 15:01) Sarkis

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, 16:52) Sarkis
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, 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:

×2

question asked: 07 May, 10:01

question was seen: 224 times

last updated: 09 May, 03:19