troubleshooting Question

SQL SERVER 2008R2 and xp_sendmail to send email getting error EXECUTE permission denied

Avatar of paultran00
paultran00Flag for United States of America asked on
DatabasesMicrosoft SQL ServerSQL
7 Comments1 Solution110 ViewsLast Modified:
Hi guys,

At my last company, in SQL SERVER2008R2, I had a stored procedure that sends an email by calling:

EXEC  master.dbo.xp_sendmail

BUT at this new company, I don't have permission and am getting the error:

The EXECUTE permission was denied on the object 'xp_sendmail', database 'mssqlsystemresource', schema 'sys'.

What are my alternatives?  
Here's what I need:  when a new record is inserted into a table, I need to be alerted via an email.  AT my last company, the INSERT TRIGGER would run a stored procedure that puts together the email then sends it out by making a call to xp_sendmail

Pavel Celba
All in One

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros