In my procs that send mail I always stop and start the mail agent to get
around this.
-----Original Message-----
From: Bowman Rita A.
[mailto:mssqldba-ezmlmshield-x72337752.[Email address protected]
Sent: Monday, March 31, 2008 11:23 AM
To: LazyDBA Discussion
Subject: RE: xp_sendmail: Failed
We have this happen occasionally. We stop and start the mail agent using
xp_stopmail and xp_startmail - and it generally goes away. The problem was
worse before we installed sp3a for SQL 2000. In addition, we use the
following to try to resend 5 times before failing (at sign replaced with
#):
Set #return = 0
Set #Counting = 0
While 1 = 1
Begin
Set #Counting =#Counting + 1
Exec #return = master..xp_sendmail @recipients = 'mail recipients',
@subject = 'whatever',
@message= 'If you have any questions or concerns, please email us
at: wecare.com',
@attachments='whatever'
-- here's the good stuff
If @return = 0
--Begin
--Print 'EMAIL Set'
Break
End
Else
Begin
/* Try 5 times */
If @Counting = 5
Break
Print 'Email Failed - Wait 10 seconds, try again'
/* 000 hours, 00 minutes, and 10 seconds */ WaitFor delay '000:00:10'
End
end
End
-----Original Message-----
From: Suraparaju Vamsi
[mailto:mssqldba-ezmlmshield-x63842416.[Email address protected]
Sent: Monday, March 31, 2008 10:30 AM
To: LazyDBA Discussion
Subject: xp_sendmail: Failed
Good morning,
My sql jobs failed due xp_sendmail. It was running fine never had an
issue but today when I was checking my sql error log and the job history
I found below one, I know if I re-boot the server it will fix the issue
but it's a production box so I am not comfortable doing so. Is there any
other way to fix this?
It's on Sql 2000, Enterprise Edition,sp2.
xp_sendmail: failed with mail error 0x8004011d [SQLSTATE 42000] (Error
18025). The step failed.
Also I tried sending test mail using:
exec master..xp_sendmail
@recipients = '[Email address protected]
@subject = 'TRO tEST',
@message = 'TRO TESTED'
Got error:
Msg 17925, Level 16, State 1, Line 0
xp_sendmail: failed with mail error 0x80040111
Please give me your thoughts on it,
Thanks
V-
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
MS Sql Server LazyDBA home page