Hi Guys,
I have a Stored Procedure containing code that will send an email.
This works if I execute the stored procedure directly.
When I start the Stored Procedure from a SQL job the mail never arrives, actually it's never being sent.
I tried to make the account running the job SysAdmin and then it works, but of course this is not to be :-)
So it's a security issue, but which rights do I need to give the user runnning the job?
The MailUser Role in MSDB is not enough!
I'm running SQL 2008R2 on this system.
Thanks
1.Right click on "SQL Server Agent"
2.Then "Properties"
3.Then go to "Alert System" section
4.Tick the "Enable mail profile" box
5.Then "Ok"
6.Restart the SQL Server Agent service