Database Simplified Headline Animator

Database Simplified

Wednesday, 26 October 2011

Configuring Database Mail In SQL Server Step By Step

To Configure Database Mail you must create database mail account and profile.Following are the steps to configure Database Mail Account And Profile.

image

image

image

image

image

image

image

image

image

image

Once Account and Profile has been created you must configure database mail using sp_configure stored procedure

exec sp_configure 'show advanced options',1
Go

Reconfigure
go

sp_configure 'Database Mail XPs',1
go

Reconfigure
go

Now the database mail configuration is done. Lets send a test mail.

 

image

image

Or you can use following query to send database mail.



EXEC msdb.dbo.sp_send_dbmail @profile_name=’Demo Profile’,
@recipients='kuldeep@dbsimplified.com',
@subject='Demo Mail Sent Using T-SQL Query',
@body='This is test email sent from database mail using T-SQL Query’
 

image

image

No comments:

Post a comment