Friday, July 21, 2017

SQL Server Database Mail Configuration

SQL Server Mail Configuration

I'm going explain, how to config SQL Server Mail Service step by step

Step 01

Log in to SQL Server , Extract Management and Right click on Database Mail. Then select Configure Database Mail.

Step 02

Following window will appear , Then click Next button


Step 03

Select  Set Up Database Mail by performing the Tasks and Click Next.

Step 04

 If this feature disable , wizard will ask to enable it. So Enable it. Then below window will appear.
Enter Profile and Description and click ADD button on Right side.

Step 05

 Here we have enter more detail. First enter Account Name and Description. Then enter SMTP mail server configurations .
  1.  email address
  2. Display Name (optional)
  3.  Reply email (optional)
  4.  SMTP Server
  5.  Port Number ex- (25 ,457 ,587) 

Select Basic Authentication under the SMTP Authentication. Then enter mail sending email account's Username and Password and click Add .

Step 06

 Then window will appear. it shows your created profile and click Next.

Step 07

 Then another window will , the Configure System Parameters description is shown.

Step 08

Then Click Next. It will show confirmation about your profile , so click Finish.

Step 09

Now SQL server was configured email service and click close .

Step 10
Run following SQL Query

sp_CONFIGURE 'show advanced', 1
sp_CONFIGURE 'Database Mail XPs', 1

How to test SQL Sever mail

Then again right click on Database Mail and select Send Test Email. Then select Database mail profile and enter receiver mail address ,  mail subject.

How to view Database Mail Log

Right click on the Database mail and select View Database Mail Log