cancel
Showing results for 
Search instead for 
Did you mean: 

xp_startsmtp

Baron
Participant
1,606

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?

Accepted Solutions (0)

Answers (1)

Answers (1)

VolkerBarth
Contributor

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.

Baron
Participant
0 Kudos

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

VolkerBarth
Contributor
0 Kudos

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

Baron
Participant
0 Kudos

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.

Baron
Participant
0 Kudos

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?

VolkerBarth
Contributor
0 Kudos

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.