Share us on:
Send Mail from Database, This is a very important feature of SQL Server Database.
Microsoft SQL Server provides users to send mail from the database.
Hi, I am Shubham Kumar, I will explain and implement how to configure and send mail from SQL Server.
Sending mail from the database is very easy, firstly you need to understand how to configure settings for SQL Server mail then you can easily send mail easily from the database.
Here, I am going to explain with an example, how to send mail from an SQL Server.
There are two ways to configure settings for sending mail from the SQL Server Database
Now, I am Configure settings for sending mail from Database
Step #1: Open Management Folder and Right Click On Database Mail and select Configure Database Mail from the given options
Step #2: If you select the option "Configure Database Mail' and you will get the welcome Window popup and then click "Next".
Step #3: The following screen will appear for settings, If you did not create any profile then you select "Set up Database Mail by performing" and click "Next".
If you have already created a profile for SQL mail then you want to modify the settings then you can choose "Manage Database Mail Account and profiles" or "View or Change System parameters".
Step #4: you will see the following screen because it is not enabled. if you click "Yes" then it makes enable for Database mail. If Database Mail has already been enabled this screen will not appear
Step #5: If you want to create a profile need to Enter a name for the Profile and also a description(not mandatory) and click "Add"
Step #6: You will get The following screen will appear. Fill out all mandatory details for your mail account that will be used to send out emails from SQL Server. When you are done click "OK".
Step #7: After that your screen will show added SMTP details, if you want to go with this profile then click on "next"
Step #8: you will see the following screen, There is an option to make the profile public or private and default profile.
If you choose public then it can be accessed by all users.
Click on the checkbox to allow this to be a public profile and select "Yes" for the default profile and then click "Next".
Step #9: You will get The following screen has some additional parameters that can be set to control how mail is sent. You can change the defaults settings or leave the defaults. When you are done click "Next"
Step #10: you will get A summary Details screen will appear that shows you all of the options that were selected. If everything is OK then click "Finish" or click "Back" to go back and make changes.
Step #11: After clicking on "Finish" the next screen will show you the status of installing Database Mail. When it is completed then close this screen.
Step #12: If you want to send mail from Database Configuration Wizard,then right click on Database Mail and then select option Send Test E-Mail
If you want to send mail from sql script then follow this given link
I hope this article will help you to learn and implement How to send mail from SQL Server if you like this article please share Us on