May 31, 2011 at 10:56 am
Hey guys,
I can set up Database Mail through pointing and clicking in SSMS, and send out a test email. But whenever I set up a SQL Server Agent job to send out nightly emails, it returns this error:
Message
[264] An attempt was made to send an email when no email session has been established
I have set this up on a few different servers... tried deleting and recreating everything... same problem.
Any help is appreciated.
May 31, 2011 at 11:37 am
Gander at this: http://msdn.microsoft.com/en-us/library/ms188663.aspx. In the MSDB database, there are system tables that you can query to see the exact error and status of your Agent initiated message and debug from there.
Jim Murphy
http://www.sqlwatchmen.com
@SQLMurph
May 31, 2011 at 11:57 am
@jim: Thanks for the resource. I checked the sysmail_event_log, but it only showed errors from test emails I sent unsuccessfully before the mail was set up properly.
To clarify a little bit, the section I have set up to send out email is in the properties of a SQL Server Agent job, Notifications page, then check e-mail, set an operator, and set next dropdown to "when job completes".
June 1, 2011 at 2:33 pm
bump !
June 1, 2011 at 2:38 pm
my google-fu pointed me to an issue where SQL server Agent needs to be restarted, based on this MS article?
http://social.msdn.microsoft.com/forums/en-US/sqltools/thread/32a2c09a-156f-43b2-9076-b11ba9ccdafb/
do you think that could be the issue? that db mail was setup after the agent was started, and it needs to stop and start to re-establish running values and queues?
Lowell
June 1, 2011 at 3:00 pm
No, restarting SQL Server Agent and the Windows Server box several times has not remedied the error.
June 1, 2011 at 11:42 pm
From my experience this works..
With sql serveragent properties, uncheck the Enable mail profile box.
Stop and restart sqlserveragent
Now Check the Enable mail profile box
Stop and restart sqlserveragent.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply