Hi,
After setting
show advanced options
to 1, you can list the advanced options by using
sp_configure
. In order to enable the Database Mail, run the following:
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Database Mail XPs', 1;
GO
RECONFIGURE
GO
Try to change
EXEC sp_send_dbmail
to
EXEC msdb.dbo.sp_send_dbmail
By the way, I would advise you to read this:
Configuring Database Mail in SQL Server[
^].