SQLServer-DBA.com Links

Subscribe to newsletter

Dba_db2_button

Powered by TypePad
SQL Server - Sp_send_dbmail and bcc

27 July,2011 by Jack Vamvas

To send BCC and Copy in SQL Sp_send_dbmail,  use this way to send email from a configured Database Mail server.

EXEC msdb.dbo.sp_send_dbmail
@recipients=N'JackVamvas@sqlserver-dba.com',
@copy_recipients ='JackVamvas@sqlserver-dba.com’
@blind_copy_recipients ='tuning@sqlserver-dba.com’
@body= 'Some text for body', 
@subject = 'Some text for subject',
@profile_name = 'MyProfile1';

The email addresses in @recipients go on the To:  line.

To  use   COPY and BCC on sp_send_dbmail , the parameters are :

@copy_recipients ='JackVamvas@sqlserver-dba.com’
@blind_copy_recipients = 'tuning@sqlserver-dba.com'

Related Posts

Set up Database Mail on SQL Server 2005  


Author: Jack Vamvas (http://www.sqlserver-dba.com)

******** *******

Subscribe to SQLServer-DBA.com

Latest posts delivered to you daily

Delivered by FeedBurner

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer