There are two ways that you can setup Database Mail, either by using the stored procedures that are included with SQL Server 2008 or by using SQL Server Management Studio.
Once we can configure Database Mail, we can following store procedure or SSMS to activate database mail tasks.
Configure and sending using SSMS is shown in this Link1 or Link2
Store procedure is given as follows:
exec msdb.dbo.sp_send_dbmail
@profile_name = 'ProfileName' in our case 'dhinakaran'
@recipients = 'Client Email Address' ,
@blind_copy_recipients = 'BCC Address',
@subject = 'Subject',
@BODY = 'Message Body',
@body_format = 'Message Type', it could be text OR html
Once we can configure Database Mail, we can following store procedure or SSMS to activate database mail tasks.
Configure and sending using SSMS is shown in this Link1 or Link2
exec msdb.dbo.sp_send_dbmail
@profile_name = 'ProfileName' in our case 'dhinakaran'
@recipients = 'Client Email Address' ,
@blind_copy_recipients = 'BCC Address',
@subject = 'Subject',
@BODY = 'Message Body',
@body_format = 'Message Type', it could be text OR html
Comments
Post a Comment