Setup SQL Server Database Mail (Private Mail Profile)

In the previous post I described how to configure Database Mail in SQL Server, types of profile and created public mail profile. In this post we’ll know about private mail profile and create it using existing account (we created in the earlier post).

Private mail profile is accessible to particular database user or roles.

To send email using private profile the database user must be member of DatabaseMailUserRole in msdb database.

Lets create private mail profile.

Steps to create private & public mail profile are common from 1st to 8th . After you click on the Next button at step 8, you come to Manage Profile Security window. Lets move further

9. Click on Private Profile panel at this window, check mar the check box at the left of the profile. And

10. Click on the User Name dropdown and select the user you want to map the profile with.

You can see in the dropdown non of user defined credentials are appearing, it’s because we have not granted any user DatabaseMailUserRole in the msdb database. Lets do it.

10. After granting access to [OPENSOURCE-TECH\SQLMailAdmin], you can see the user is appearing in the dropdown. Select the user, make sure to check mark the check box and click on the Next button.

11. Configure it according to your requirement.

12. And Finish.

Remember, you’ll be able e send mail using private profile only when you are logged in with the user it is mapped with.

Happy Learning!

Leave a Comment

Your email address will not be published. Required fields are marked *