Error Sending Mail Using SQL Database Mail

Microsoft SQL ServerI was recently doing some testing of a script I created for a client which used SQL Database Mail for sending emails. this was on my one of my demo environments, but I received an error when testing the script:

Error message

Microsoft Dynamics GP

Unhandled database exception: [Microsoft][SQL Server Native Client 11.0][SQL Server]The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'.

The solution I found was to grant permissions to public, which did work, but I’m not convinced this would be an approach to take on a clients live system:

GRANT EXECUTE on sp_send_dbmail TO public

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Leave a Reply

Your email address will not be published. Required fields are marked *