dbTalk Databases Forums  

Problems with xp_startsmtp in 9.0.2

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Problems with xp_startsmtp in 9.0.2 in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Thiago
 
Posts: n/a

Default Problems with xp_startsmtp in 9.0.2 - 07-27-2009 , 03:38 PM






Hello,

How can I specify a smtp_sender_name on system procedure xp_startsmtp
running on SA 9.0.2.3687 ?!

I´ve tried to use the syntax below but it just works on Unix/Linux
SMTP Sever. Now I have a Microsoft SMTP Server on IIS 6.

'User Name<user (AT) domain (DOT) com>'

The problem is not with the Microsoft SMTP Server, as it runs just
fine when the email is sent from a Cold Fusion Server, with the same
syntax above.

I´v already seen that it´s possible on version 10 (smtp_sender_name).

Thanks a lot,
Thiago<thiago.reis (AT) embraer (DOT) com.br>

Reply With Quote
  #2  
Old   
Breck Carter [TeamSybase]
 
Posts: n/a

Default Re: Problems with xp_startsmtp in 9.0.2 - 07-28-2009 , 06:35 AM






Code shown below. Note that V9 has some limitations, such as no
parameters for authorization user name and password, which means in
*my* case xp_startsmtp works ok but xp_sendmail returns 553. Upgrading
to V11 or at least V10 is highly recommended.

Breck

BEGIN
DECLARE @return_code INTEGER;
DECLARE @smtp_sender LONG VARCHAR;
DECLARE @smtp_server LONG VARCHAR;
DECLARE @smtp_port INTEGER;
DECLARE @smtp_timeout INTEGER;

DECLARE @smtp_recipient LONG VARCHAR;
DECLARE @smtp_subject LONG VARCHAR;
DECLARE @smtp_message LONG VARCHAR;

SET @smtp_sender = 'bcarter (AT) risingroad (DOT) com';
SET @smtp_server = 'vmail1.sentex.ca';
SET @smtp_port = 25;
SET @smtp_timeout = 10;

@return_code = CALL xp_startsmtp (
smtp_sender = @smtp_sender,
smtp_server = @smtp_server,
smtp_port = @smtp_port,
timeout = @smtp_timeout );

MESSAGE STRING ( 'xp_startsmtp @return_code = ', @return_code )
TO CLIENT;

SET @smtp_recipient = 'Breck.Carter (AT) gmail (DOT) com;bcarter (AT) bcarter (DOT) com;';
SET @smtp_subject
= STRING ( 'test subject at ', CURRENT TIMESTAMP );
SET @smtp_message
= STRING ( 'test message at ', CURRENT TIMESTAMP );

@return_code = CALL xp_sendmail (
recipient = @smtp_recipient,
subject = @smtp_subject,
"message" = @smtp_message );

MESSAGE STRING ( 'xp_sendmail @return_code = ', @return_code )
TO CLIENT;

CALL xp_stopsmtp(); -- do not bother to check return code

EXCEPTION WHEN OTHERS THEN
CALL xp_stopsmtp();

END;

On Mon, 27 Jul 2009 13:38:24 -0700 (PDT), Thiago <gorpo81 (AT) gmail (DOT) com>
wrote:

Quote:
Hello,

How can I specify a smtp_sender_name on system procedure xp_startsmtp
running on SA 9.0.2.3687 ?!

I´ve tried to use the syntax below but it just works on Unix/Linux
SMTP Sever. Now I have a Microsoft SMTP Server on IIS 6.

'User Name<user (AT) domain (DOT) com>'

The problem is not with the Microsoft SMTP Server, as it runs just
fine when the email is sent from a Cold Fusion Server, with the same
syntax above.

I´v already seen that it´s possible on version 10 (smtp_sender_name).

Thanks a lot,
Thiago<thiago.reis (AT) embraer (DOT) com.br
--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter (AT) risingroad (DOT) com

Reply With Quote
  #3  
Old   
Thiago
 
Posts: n/a

Default Re: Problems with xp_startsmtp in 9.0.2 - 07-28-2009 , 10:09 AM



Hello Carter,

Thank you for your attention!

My problem is the sender_address argument, like the code below:

SET @smtp_sender = 'bcarter (AT) risingroad (DOT) com'; => WORKS

SET @smtp_sender = 'Carter<bcarter (AT) risingroad (DOT) com>'; => DOES NOT
WORK with Microsoft SMTP Sever, just works on Unix SMTP Server.

Procedure "xp_sendmail" returns the error number 501.

Any idea?

Thank you,
Thiago <thiago.reis (AT) embraer (DOT) com.br>

Reply With Quote
  #4  
Old   
Graeme Perrow [Sybase iAnywhere]
 
Posts: n/a

Default Re: Problems with xp_startsmtp in 9.0.2 - 07-28-2009 , 11:24 AM



You need a space before the <. Try

SET @smtp_sender = 'Breck Carter <bcarter (AT) risingroad (DOT) com>';


Graeme Perrow
Senior Software Developer
gperrow _at_ ianywhere _dot_ com
Sybase iAnywhere Engineering

SQL Anywhere Developer Community
http://www.sybase.com/developer/libr...ere-techcorner
SQL Anywhere Blog Center
http://www.sybase.com/sqlanyblogs


Thiago wrote:
Quote:
Hello Carter,

Thank you for your attention!

My problem is the sender_address argument, like the code below:

SET @smtp_sender = 'bcarter (AT) risingroad (DOT) com'; => WORKS

SET @smtp_sender = 'Carter<bcarter (AT) risingroad (DOT) com>'; => DOES NOT
WORK with Microsoft SMTP Sever, just works on Unix SMTP Server.

Procedure "xp_sendmail" returns the error number 501.

Any idea?

Thank you,
Thiago <thiago.reis (AT) embraer (DOT) com.br

Reply With Quote
  #5  
Old   
Thiago
 
Posts: n/a

Default Re: Problems with xp_startsmtp in 9.0.2 - 08-20-2009 , 08:53 AM



On 28 jul, 13:24, "Graeme Perrow [Sybase iAnywhere]"
<ReplyToNewsgroupOnly-gperro... (AT) SPAMianywhere (DOT) PLEASEcom> wrote:
Quote:
You need a space before the <. Try

SET @smtp_sender = 'Breck Carter <bcar... (AT) risingroad (DOT) com>';

Graeme Perrow
Senior Software Developer
gperrow _at_ ianywhere _dot_ com
Sybase iAnywhere Engineering

SQL Anywhere Developer Community
* *http://www.sybase.com/developer/libr...ere-techcorner
SQL Anywhere Blog Center
* *http://www.sybase.com/sqlanyblogs



Thiagowrote:
Hello Carter,

Thank you for your attention!

My problem is the sender_address argument, like the code below:

* SET @smtp_sender = 'bcar... (AT) risingroad (DOT) com'; * => WORKS

* SET @smtp_sender = 'Carter<bcar... (AT) risingroad (DOT) com>'; * => DOES NOT
WORK with Microsoft SMTP Sever, just works on Unix SMTP Server.

Procedure "xp_sendmail" returns the error number 501.

Any idea?

Thank you,
Thiago<thiago.r... (AT) embraer (DOT) com.br>- Ocultar texto das mensagens anteriores -

- Mostrar texto das mensagens anteriores -
Sorry about the delay.

Still not working on SA. I´ll keep sending e-mails by Cold Fusion
Server for now. After migration to version 11, I´ll try again.

Thank´s a lot!
Thiago.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.