7

I'm working on a console application that uses the ExactTarget API to send out emails.

I'm trying to add a CC to the emails but for some reason I can't get it to work. I am basically creating the TriggeredSendDefinition in code, then adding it to a TriggeredSend object, and calling the Create method.

Here's what i'm trying:

TriggeredSendDefinition tsd = new TriggeredSendDefinition();
tsd.CustomerKey = externalKey;
tsd.CCEmail = "%%CCAddress%%";

TriggeredSend ts = new TriggeredSend();
ts.TriggeredSendDefinition = tsd;
ts.Subscribers = new Subscriber[1];

ts.Subscribers[0] = new Subscriber();
ts.Subscribers[0].EmailAddress = emailAddress;
ts.Subscribers[0].SubscriberKey = emailAddress;

ts.Subscribers[0].Attributes = new ExactTarget.Attribute[2];
ts.Subscribers[0].Attributes[0] = new ExactTarget.Attribute();
ts.Subscribers[0].Attributes[0].Name = "HTML__table";
ts.Subscribers[0].Attributes[0].Value = emailContent;

ts.Subscribers[0].Attributes[1] = new ExactTarget.Attribute();
ts.Subscribers[0].Attributes[1].Name = "CCAddress";
ts.Subscribers[0].Attributes[1].Value = "staticemail@email.com";
string tsRequestID = "";
string tsStatus = "";
CreateResult[] results = client.Create(new CreateOptions(), new APIObject[] { ts }, out tsRequestID, out tsStatus);
return results[0].StatusMessage;

Using this approach i receive the email for the original recipient, but don't see a CC on the email.

I've also tried just setting the CCEmail property of the TriggeredSendDefinition object to the CC email i want to send it to instead of using the attribute approach and it did not work. I read about the attribute approach from the exacttarget forums and tried it but to no avail.

My goal is to be able to pass in a list of email address for that CC field, to be able to CC the email to various clients.

An alternative would also be to send the same email to multiple recipients using the normal "TO" field.

Any thoughts?

Thanks,

TS.

6

The BCC functionality needs to be enabled on your account first. Talk to your account rep for details. You can see the note about it on the bottom of this page: http://help.exacttarget.com/en-US/technical_library/web_service_guide/objects/triggeredsenddefinition/

| improve this answer | |
  • I'll have our accounts team look into whether we have this disabled at the moment. Thanks for the fast reply. As a work around, i created different subscribers for each person i need the email to go out to instead of using CC/BCC. – TSiqueira Jul 9 '14 at 14:53
3

The CC/BCC functionality is an additional feature that is typically not enabled by default.

You can check to see if it is enabled by going into the TriggeredSend section under the Interactions Tab, go into the TriggeredSend Definition that is defined and if the feature is enabled then you will see fields for CC and BCC there. If not, then you will need to contact your ExactTarget relationship manager in order to get that enabled.

By default the CC/BCC fields on the TriggeredSend Definition are designed to be populated with a static value when the definition is created so that every email sent through that definition will be copied to that address.

It is possible to setup a definition in order to send to dynamic CC/BCC email addresses which are defined in the API.

In order to make the CC/BCC fields dynamic:

  1. Create a profile attribute to hold the dynamic value, for example call it "BCCAddress"
  2. Update the TriggeredSendDefinition so that the BCC field contains a reference to that profile attribute using the substitution string format: %%BCCAddress%%
  3. Make sure to publish the TriggeredSendDefinition after making changes if it was already published
  4. Update the API request so that it passed a value for BCCAddress as an Attribute on the Subscriber object similar to how you are likely passing other profile attributes. If you need to have multiple addresses receive the CC/BCC then a semi-colon just needs to separate them.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.