BCC functionality is possible using the API, and it can be used in the v3.1, v5, and v5.1 Bulk Job Submit and Bulk Campaign Submit API calls, but it is a bit complex.
With CC/BCC processing, MessageGears takes a unique approach which allows for a degree of individualized tracking of messages, and it allows for custom email headers. Each CC or BCC message is actually treated as a second recipient who simply receives a copy of the original recipient content.
When making a MessageGears Bulk API call, you can provide To recipients and CC recipients as follows:
<RecipientList>
<Recipient>
<EmailAddress>torecipient@blackhole.messagegears.com</EmailAddress>
<To>
<InternetAddress>
<Address>torecipient@blackhole.messagegears.com</Address>
</InternetAddress>
</To>
<Cc>
<InternetAddress>
<Address>ccrecipient@blackhole.messagegears.com</Address>
</InternetAddress>
</Cc>
</Recipient>
<Recipient>
<EmailAddress>ccrecipient@blackhole.messagegears.com</EmailAddress>
<To>
<InternetAddress>
<Address>torecipient@blackhole.messagegears.com</Address>
</InternetAddress>
</To>
<Cc>
<InternetAddress>
<Address>ccrecipient@blackhole.messagegears.com</Address>
</InternetAddress>
</Cc>
</Recipient>
</RecipientList>
Note that the <To>
, <Cc>
, and <Bcc>
tags are mostly decorative -- the recipient passed in the EmailAddress parameter is the only recipient that will be sent to. In the above list, you're sending 2 separate messages, based on the number of <Recipient>
tags that are within the list. In each Recipient tag, you're defining the headers, such as To, CC, and BCC, though simply defining those headers does not actually send additional messages. Each Recipient tag indicates that a specific recipient will receive the message, and does NOT automatically send the message to the CC'd or BCC'd recipient.
For example, if you included only the following:
<RecipientList>
<Recipient>
<EmailAddress>torecipient@blackhole.messagegears.com</EmailAddress>
<To>
<InternetAddress>
<Address>torecipient@blackhole.messagegears.com</Address
</InternetAddress>
</To>
<Cc>
<InternetAddress>
<Address>ccrecipient@blackhole.messagegears.com</Address>
</InternetAddress>
</Cc>
</Recipient>
</RecipientList>
Only a single message would be sent, though it would appear that an additional CC recipient was copied. You must include a second Recipient block to actually send the CC'd recipient a message
Below is another example in which BCC is used. Notice that since the goal of BCC is to inform a recipient that an email has been sent to 1 or more recipients, the email will simply provide a header with this information without actually sending an email to the To, BCC and CC email addresses within that Recipient tag. Again, only the single recipient's email address listed in <EmailAddress>
will receive the email.
<RecipientList>
<Recipient>
<EmailAddress>recipient1@blackhole.messagegears.com</EmailAddress>
<To>
<InternetAddress>
<Address>recipient2@blackhole.messagegears.com</Address>
</InternetAddress>
</To>
<Bcc>
<InternetAddress>
<Address>recipient1@blackhole.messagegears.com</Address>
</InternetAddress>
</Bcc>
</Recipient>
<Recipient>
<EmailAddress>recipient2@blackhole.messagegears.com</EmailAddress>
<To>
<InternetAddress>
<Address>recipient2@blackhole.messagegears.com</Address>
</InternetAddress>
</To>
</Recipient>
</RecipientList>
To send to multiple CC or BCC recipients, simply include a separate recipient block for each.
Comments
Please sign in to leave a comment.