dbTalk Databases Forums  

Problem with xp_smtp_sendmail

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Problem with xp_smtp_sendmail in the microsoft.public.sqlserver.dts forum.



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

Default Problem with xp_smtp_sendmail - 07-19-2006 , 02:41 PM






I am using this to send mail on a server that has to email out some
reports. We changed, because MAPI on that box would hang at times for
no particular reason.

It is the program/stored procedure located here:

http://www.sqldev.net/xp/xpsmtp.htm

All of a sudden, today, it just stopped working.

The error message is no help, and MAPI doesn't appear to be working all
the time either. It ran thru the email on one part of the job (the old
part, using xp_sendmail) one time, but failed on a second "test" of that
same job.

A restart of that server didn't fix it either.

The error message that is getting issued is:

Executed as user: mydomain\sqlaccount. Error: connecting to server
mymailserver.mydomain.com [SQLSTATE 01000] (Message 0) Associated
statement is not prepared [SQLSTATE HY007] (Error 0). The step failed.


The job that fails is:




/*
xp_sendmail @recipients='user1 (AT) mydomain (DOT) com;',
@subject='Cancelled Orders Spreadsheet',
@attachments='\\mydbserver\SFA\report1.xls'

*/


declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
@FROM = N'mysqlaccount (AT) mydomain (DOT) com',
@FROM_NAME = N'SQL Administrator',
@TO = N'user1 (AT) mydomain (DOT) com,
@priority = N'HIGH',
@subject = N'Cancelled Orders Spreadsheet',
@type = N'text/plain',
@attachments = N'\\mydbserver\SFA\report1.xls',
@server = N'mailserver.mydomain.com'
select RC = @rc

go




Neither of these jobs will work any more.

I am completely stumped. Server is Windows 2003, SQL 2000, service pack
4. O/S has all service packs as well.

Any help/advice appreciated.


BC

Reply With Quote
  #2  
Old   
Gert E.R. Drapers
 
Posts: n/a

Default Re: Problem with xp_smtp_sendmail - 09-11-2006 , 10:30 PM






Can you ping your mail server? Did you check your firewall?
GertD (AT) SQLDev (DOT) Net

"Blasting Cap" <goober (AT) christian (DOT) net> wrote

Quote:
I am using this to send mail on a server that has to email out some
reports. We changed, because MAPI on that box would hang at times for no
particular reason.

It is the program/stored procedure located here:

http://www.sqldev.net/xp/xpsmtp.htm

All of a sudden, today, it just stopped working.

The error message is no help, and MAPI doesn't appear to be working all
the time either. It ran thru the email on one part of the job (the old
part, using xp_sendmail) one time, but failed on a second "test" of that
same job.

A restart of that server didn't fix it either.

The error message that is getting issued is:

Executed as user: mydomain\sqlaccount. Error: connecting to server
mymailserver.mydomain.com [SQLSTATE 01000] (Message 0) Associated
statement is not prepared [SQLSTATE HY007] (Error 0). The step failed.


The job that fails is:




/*
xp_sendmail @recipients='user1 (AT) mydomain (DOT) com;',
@subject='Cancelled Orders Spreadsheet',
@attachments='\\mydbserver\SFA\report1.xls'

*/


declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
@FROM = N'mysqlaccount (AT) mydomain (DOT) com',
@FROM_NAME = N'SQL Administrator',
@TO = N'user1 (AT) mydomain (DOT) com,
@priority = N'HIGH',
@subject = N'Cancelled Orders Spreadsheet',
@type = N'text/plain',
@attachments = N'\\mydbserver\SFA\report1.xls',
@server = N'mailserver.mydomain.com'
select RC = @rc

go




Neither of these jobs will work any more.

I am completely stumped. Server is Windows 2003, SQL 2000, service pack
4. O/S has all service packs as well.

Any help/advice appreciated.


BC



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.