SQL Database Mail – User security to allow facility
05-Jan-1010 Leave a comment
Security > Logins > Pick Login > Properties > User Mapping > msdb > tick on
Database role membership include DatabaseMailUserRole
msdb has more database role memberships. May be resolution to LinkedServer issue.
PROBLEM
Procedure sp_send_dbmail, line 141 profile name is not valid
SOLVED
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp @principal_name = 'ApplicationUser', @profile_name = 'AdventureWorks2008R2 Administrator Profile', @is_default = 1 ;