How To: BCC in SharePoint Workflow Email

So say you have a SharePoint Workflow, nicely designed in SharePoint Designer. Let’s say the list to send to includes a SharePoint group with 50 users. Those 50 email addresses will be displayed in the To: or cc: fields which may not be desirable. In most cases, you’ll want to add those to a bcc: field. This way, a recipient recieves the important update, without the knowledge of everyone else’s address.

 One of the steps in the SPD Workflow designer wizard includes sending an email which is simple enough. But the challenge with the design wizard is that it only includes a placeholder for your To: and CC: fields. The bcc placeholder is missing. This is an annoyance in larger environments or extranet buildouts.

The workaround to get this behaving as you want is fairly simple:

  1. Setup the test list.
    In this example, I have an “Announcements” style list. It has a title, a message, a Target Audience (which is a SharePoint person / group), a cc: target (which is also a SharePoint person / group) and a checkbox to “send mail”)This list will take announcements, and if the “send email” box is checked, will fire off a custom workflow built in SPD to send email to the Target and cc Target. (But we’ll trick the cc to a bcc).
  2. Save your list and open up SharePoint Designer (SPD) and define a new workflow.
  3. Create a step to Send the email:
  4. Above you see a conditional check for the “Send Email” field. Then create a “Send an Email” action. Below are some of the mechanics to select the fields for the To:, CC:, Subject: and Message body. Target will be mapped to the To: field.
  5. Below you’ll see the mappings as defined by using the wizard.
  6. But what we want to do is change the mapping from the CC: / Target CC to be a BCC in the outgoing email. That requires a little hack. Save the workflow by clicking OK and Finish to close the wizard.
  7. In SharePoint designer, navigate to the folder that holds the newly created workflow files.
    If you followed my bouncing ball, the folder will be called “Send Emal with BCC”.
  8. Now find the .xoml file (which is highlighted above) and open in NotePad. The file that opens is an XML document with the guts and instructions for the workflow. If you double-click it, it will open in the SPD Workflow wizard, which we don’t want.
  9. In NotePad, do an Edit/Find for the word BCC:
  10. Aha! What’s this? The actual instruction for the email. You’ll see in the :EmailActivity node an attribute for CC, BCC and To. Unfortunately, SPD has defined the BCC as Null. This is simple to change.
  11. Swap BCC with CC. Basically, change the tag BCC to CC and the CC tag to BCC; effectively swapping them as shown below.
  12. Save the file.
  13. But you’re not done because we need to redeploy to the SharePoint server.
  14. Double-click the workflow file (.xoml) so the wizard opens once more. To review, and if you’re curious, you can view the contents of the Step:
  15. Notice the CC: field is now empty. The BCC is holding that placeholder mysteriously…we know better, don’ we?
  16. Click OK, then Finish to redeploy the Workflow.
  17. Go ahead and test, it will BCC anyone in the CC Target field in the list.

Important note:
You might be tempted to eliminate the To: and just define a BCC for your email. No can do. You must have a To: with any email to a BCC. Have you ever been the recipient of BCC email without a person in the To? No, because that’s a requirement.
In the To, you’ll typically find the sender or a noreply@ type of email address.

So in this case, your list and workflow can define a single user (perhaps you, the creator of the list item, or a system/support account…that’s what we do) as the Target for To:.

About the Author