title: Execute permission for SP_SEND_MAIL not working?
body: <p>I humbly ask for your guidance regarding this matter.</p>
  
  <p>I am trying to execute a stored procedure from SQL SERVER. I used it in a VB.NET application.</p>
  
  <p>When using "SA" login in the connection string, I can execute the code no problem, but if not... I receive this error</p>
  
  <pre><code>The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'.
  </code></pre>
  
  <p>So, I searched in this site and the others, pointing out to add permissions to the account where the command does not proceed, to DatabaseMailUserRole.</p>
  
  <p>I think I had done that, not using this <a href="https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms188719(v=sql.105)" rel="nofollow noreferrer">method </a> though</p>
  
  <p>Here are the screenshots of the things that I did.</p>
  
  <p><a href="https://i.stack.imgur.com/8CXbk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8CXbk.jpg" alt="enter image description here"></a>
  granted execution</p>
  
  <p><a href="https://i.stack.imgur.com/HwS8g.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HwS8g.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/gpyIa.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gpyIa.jpg" alt="enter image description here"></a></p>
  
  <p>Below is the command that I would like to run in the stored procedure.</p>
  
  <pre><code>                    exec msdb.dbo.sp_send_dbmail 
                      @profile_name = 'SendSQLMail', 
                      @recipients = 'test@gmail.com', 
                      @blind_copy_recipients ='test2@gmail.com',
                      @subject = 'TESTS', 
                      @body =  "A SOMETHING",
                      @execute_query_database = '[FF]',
                      @body_format = 'text'
  </code></pre>
  
  <p>Please do tell me if you need more details regarding my work</p>
  
  <p>EDIT:</p>
  
  <p>The UserName that I would like to grant access is FF</p>