Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email step in job no longer working...

Status
Not open for further replies.

gjsaturday

Technical User
Jan 18, 2005
45
US
I have over 20 jobs where step one is a DTS package to create an excel spreadsheet with query results. The 2nd step is to email out that spreadsheet to people outside my organization. This process has been working great for over a month. As of yesterday, the email step doesn't work. In the step details of the job history, I get the following:

"Executed as user: USLAB\<userid>. Error: sending message [SQLSTATE 01000] (Message 0) Server response: 571 Cannot relay. Mailbox not available any.one@anywhere.com [SQLSTATE 01000] (Message 0). The step succeeded."

The result for the job shows Successful. What should I be looking for?
 
One more note, I have other jobs that are only emailed to internal people and those are still working just fine.
 
It sounds to me like it could be some type of firewall issue, especially if your internal users on the network receive emails ok. Have you checked with your operations group to see if anything has changed? Also, are you using the Email Task within DTS or xp_sendmail?
 
Gradley, thanks for your input. I have a ticket open with my techinal support services. Hopefully they'll be able to help me. To do the email, I actually use a step in the job with the following TSQL code:

declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
@FROM = N'Anyone@internal.net',
@FROM_NAME = N'Any One',
@TO = N'Somebody@any.com',
@priority = N'NORMAL',
@subject = N'Something here',
@message = 'Attached is the file containing blah blah blah',
@attachments= N'\\someserver\somefolder\Query_ Results\somespreadsheet.XLS',
@server = N'aprelay.internal.net'

go

Is there a more efficient way that I don't know of?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top