SQLTeam.com | Weblogs | Forums

@blind_copy_recipients with MSDB.DBO.SP_SEND_DBMAIL


I've been trying for days to get MSDB.DBO.SP_SEND_DBMAIL to send out blind copies. No matter what I do, I can't get it to work. The email addresses are correctly formatted and semi-colon delimited. I have been successful using the @recipients parameter, but the emails are a sensitive nature, and I do not want to reveal who else the email is going to, therefore I need to use blind copies. @recipients is a NULL value ie: '' as is @copy_recipients. I've also tried using blanks in both of those parameters, with no success. Any pointers or suggestions would certainly be appreciated.


I tried the following on my dev system, and it worked as expected.

EXEC msdb.dbo.sp_send_dbmail
	@blind_copy_recipients = 'myemail@mycompany.com',
	@body = 'This is the body of the message' ,
	@subject = 'This is the subject of the message';

I have a default profile set up, so I didn't need to provide the @profile_name; you might need to provide a profile name if that is not the case. If it still does not work for you, then see what the log says. You can right click on the Database Mail node in SSMS object explorer (under Management) to see the log. If you don't see anything in the log, right click again on the Database Mail node, select Configure database mail, view or change system parameters, and change logging level to Extended or Verbose.