How to send E-mail from database in Sqlserver.

Hi All, I this post I’ll explain how to set up email functionality in Sqlserevr and send email to others.

To setup Database Mail, connect to your server and expand the Management node of the tree and then right click on “Database Mail”.

1

Then select “Configure Database Mail’ and you will get the following welcome screen and the click “Next”.

2

The following screen will appear and select “Set up Database Mail by performing…” and click “Next”.

3

If Database Mail has not been enabled, you will get this following screen. Just click “Yes” to enable it.  If it has already been enabled this screen will not appear.

4

Enter in a name for the Profile and also a description and click “Add…”

6

The following screen will appear.  Fill out the details for your mail account that will be used to send out email from SQL Server.  When you are done click “OK”.

7

After you click “OK” you will be brought back to this screen and the SMTP details will now show for the account you just setup.  Click “Next” to continue.

8

On the next screen you will see the name of the profile that you just setup.  Click on the checkbox to allow this to be a Public profile and also select “Yes” for the default profile and then click “Next”.

9

10

A summary screen will appear that shows you all of the options that were selected.  If everything is correct click “Finish” or click “Back” to go back and make changes.

11

When you click “‘Finish” the next screen will appear that shows you the status of installing Database Mail. When this has finished just click “Close” to close this screen.

12

To test Database Mail, right click on Database Mail and select “Send Test E-Mail”.

 

 

Fill in a “To:” email address and change the body of the email if you want and then click “Send Test E-Mail”.

13

After you have sent the email you will get this message box to confirm if the email was received or not.  If it was you can click “OK” to close the screen or click “Troubleshoot” which will launch the help information to see what the issue may be and how it can be resolved.

 

To setup Database Mail, connect to your server and expand the Management node of the tree and then right click on “Database Mail”.

Then select “Configure Database Mail’ and you will get the following welcome screen and the click “Next”.

The following screen will appear and select “Set up Database Mail by performing…” and click “Next”.

If Database Mail has not been enabled, you will get this following screen. Just click “Yes” to enable it.  If it has already been enabled this screen will not appear.

Enter in a name for the Profile and also a description and click “Add…”

The following screen will appear.  Fill out the details for your mail account that will be used to send out email from SQL Server.  When you are done click “OK”.

After you click “OK” you will be brought back to this screen and the SMTP details will now show for the account you just setup.  Click “Next” to continue.

On the next screen you will see the name of the profile that you just setup.  Click on the checkbox to allow this to be a Public profile and also select “Yes” for the default profile and then click “Next”.

The following screen has some additional parameters that can be set to control how mail is sent.  You can make changes or leave the defaults.  When you are done click “Next”.

A summary screen will appear that shows you all of the options that were selected.  If everything is correct click “Finish” or click “Back” to go back and make changes.

When you click “‘Finish” the next screen will appear that shows you the status of installing Database Mail. When this has finished just click “Close” to close this screen.

To test Database Mail, right click on Database Mail and select “Send Test E-Mail”.

Fill in a “To:” email address and change the body of the email if you want and then click “Send Test E-Mail”.

After you have sent the email you will get this message box to confirm if the email was received or not.  If it was you can click “OK” to close the screen or click “Troubleshoot” which will launch the help information to see what the issue may be and how it can be resolved.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s