How send email with “execute as user”
-
03-03-2021 - |
Pergunta
I need that all my system users can send email from the DB. not to assign everyone the role in the msdb database I created one login/user "send_mail", and grant permission on msdb db, specifically DatabaseMailUserRole.
I need that all my users send email execute a store procedure that within execute the statement execute as user='send_mail" before of msdb..sp_send_db_mail.
The user send_mail have db_owner, and the DatabaseMailUserRole, but can't send email.
The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'.
Anyone can help me please?
Nenhuma solução correta
Licenciado em: CC-BY-SA com atribuição
Não afiliado a dba.stackexchange