Thursday, July 10, 2008

An attempt was made to send an email when no email session has been established

I got the above error when job which will send email to an operator when it is completed did not work and while troubleshooting I got below info

Configure SQL Server Agent Mail to Use Database Mail

  1. To set up SQL Server Agent Mail to use Database Mail
  2. In Object Explorer, expand a server.
  3. Right-click SQL Server Agent, and then click Properties.
  4. Click Alert System.
  5. Select Enable Mail Profile.
  6. In the Mail system list, select Database Mail.
  7. In the Mail profile list, select a mail profile for Database Mail.
  8. Restart SQL Server Agent.