Successfully BCC'ing Salesforce in outgoing Marketo emails

Alexandra_Grass
Level 1

Successfully BCC'ing Salesforce in outgoing Marketo emails

Hello!

Would any of you have sucessfully implemented the Marketo BCC option using an Email-to-Salesforce email address in the BCC field?

We have requested that the option be activated, and the Salesforce account we are using for this purpose is receiving the emails. However, all the emails are landing in the "Unresolved items" folder, instead of being associated to the right lead/contact, although Email-to-Salesforce is configured to automatically associate the activity to the leads/contacts, and all the leads/contacts necessarily already exist in Salesforce (since we're doing a complete sync of the two databases).

One thing we noticed is that, in the activity created by Salesforce from the BCCed email, the 'To' field is missing, and the Email-to-Salesforce address appears in an 'Additional-To' line (as opposed to a BCC line). But we don't have the access to either Marketo or Salesforce that we would need to figure out where the problem comes from.

Thanks in advance for any insight you might have on this issue!

Cheers!

Alexandra.

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: Successfully BCC'ing Salesforce in outgoing Marketo emails

First question: are you doing this because Marketo's email activity sync isn't granular enough (i.e. only one send per lead per day)?  Or because of API usage concerns? Or... ?

Anyway, Email-to-Salesforce looks in the To: and Cc:, as you have seen. If you embed the lead information somewhere else in the email (like "This email was sent to {{Lead.Email Address}}" in the footer, or something faux-cryptic like "LID: {{Lead.SFDC Id}}") you could use Apex code to resolve the unresolved emails. (If Apex can read the SMTP headers of an Email-to-Salesforce task, that would be even easier, but I have severe doubts that this is possible).

Alexandra_Grass
Level 1

Re: Successfully BCC'ing Salesforce in outgoing Marketo emails

Marketo's limit at one activity per lead per day is part of the reason we are looking to implement this.

Another reason is that the emails we send are very highly personalised (not just in the greeting or the signature, but the actual content of the email, keywords, tone etc.), and it is not uncommon to receive replies or follow-ups to emails sent a year or 18 months before. To maintain consistency between our automated and human-to-human communication with our database, we need to keep a record of the exact emails that were sent. But systematically rewriting the "Add Task" flow step for each email we send while ensuring that it can handle both classic dynamic content and scripted tokens sounds like the perfect recipe for a nightmare!

I'm amazed that I actually thought of a similar retreatment of the unresolved items through Apex coding! (we're very new users of Marketo, and I'm not really supposed to be a dev/techie) I'm just a bit wary of going into custom coding like that, because not everybody on the team is a geeky as I am, so I'm not sure how maintainable such code would be.

In any case, thank you very much for your post! It's great to connect with other advanced users of Marketo!

SanfordWhiteman
Level 10 - Community Moderator

Re: Successfully BCC'ing Salesforce in outgoing Marketo emails

I was curious about one thing you said and had one of my clients open a case. The To: header should include the original lead's email address. If it doesn't for you, contact Marketo support.  I presume you've made sure your sender addresses are Email-to-Salesforce approved senders?

I would not be overly concerned about long-term reliability of the Apex code, if that proves necessary.  But all custom code should have a "living" owner, it's true (whether contract or in-house).

Alexandra_Grass
Level 1

Re: Successfully BCC'ing Salesforce in outgoing Marketo emails

We had exactly the same reflex! In a classic BCC, the To: is the original lead's email, and the BCC address is usually not displayed. But in the emails that Marketo sends as BCC, the To: is the BCC email address and, depending on the email client, either the original lead's email address becomes the 'alias' of the BCC email address, or it does not appear at all.

Here are a couple of screenshots I made while trying to figure out how the BCC was setup in Marketo.

This set was made using Thunderbird as email client for the BCC emails:

- Here, I tested how a classic BCC email looked in Thunderbird (by BCCing myself in an email sent by either Thunderbird or Gmail)

151229 (1) BCC emails from Thunderbird in Thunderbird (Anonymised).png

- Here I tested how a Marketo BCC email looked in Thunderbird (by asking support to BCC my email and looking up in Thunderbird first an email sent to a Gmail address, and an email sent to a work email address)

151229 (1) BCC emails from Marketo in Thunderbird (Anonymised).png

This second set was made using Gmail as email client for the BCC emails:

- Same as before: Here, I tested how a classic BCC email looked in Gmail (by BCCing myself in an email sent by either Thunderbird or Gmail)

151229 (2) BCC emails from Thunderbird in Gmail (Anonymised).png

- and finally: Here I tested how a Marketo BCC email looked in Gmail (by asking support to BCC my Gmail address and looking up in Gmail first an email sent to a Gmail address, and an email sent to a work email address)

151229 (2) BCC emails from Marketo in Gmail (Anonymised).png

Incidentally, this is what the task created in Salesforce looks like when the BCC is an Email to Salesforce address:

151216 Messed up email to salesforce (Anonymised).png

SanfordWhiteman
Level 10 - Community Moderator

Re: Successfully BCC'ing Salesforce in outgoing Marketo emails

Well, what you're calling an "alias" is in fact the standard SMTP display-name component. Whether it happens to look like an email address is immaterial: it is not used for mail routing, only for cosmetic display, and should not be interpreted as if it's an email address at all.  The address is only the part in <>,

In the header

  To: My Name <myname@example.com>

the only destination address reflected is myname@example.com.

In the header

  To: "myothername@example.com" <myname@example.com>

the only destination address is again myname@example.com.  The email-like display-name is not an additional To: address.

In the simpler form

  To: myothername@example.com

here the destination address is indeed myothername@example.com.

In other words, the presence of an email address in <> (angle brackets) mandates per the SMTP standard that only the email address in <> is the email address (technically, the addr-spec). So there's no reason for any mail parser (like Email-to-Salesforce) to read the display name when matching (unless it had some specific, non-standard ability to do so).  Apex could obviously treat this value however it wanted, but it would be exceeding (and basically ignoring) the SMTP specification.

tl;dr this is not an acceptable way for Marketo to be formatting BCC emails which need to be machine-readable.  You should open a case (bug report). In the meantime, you'll probably have to use Apex to fix it up.

Anonymous
Not applicable

Re: Successfully BCC'ing Salesforce in outgoing Marketo emails

Confirming what was said here. I actually asked Marketo to enable the global BCC option and after they did, I found they are doing a "Fake BCC", and replacing the To with the BCC address and using the display name, as Sanford Whitman​ confirmed, as the place where the original email address is placed. I am manually parsing the MIME so I am just replacing the email with the display name. Not the optimal strategy but it seems the best option. Marketo should be doing a true BCC in which they don't send a 2nd email but just 1 email including a BCC.

Also here are details about pulling the information about the email:

'x-mailfrom': 'xxx-yyy-123.0.1028.0.0.1038.7@em-sj-77.mktomail.com',

In X-Mailfrom, the first 6 alphanumerics are your subscription’s identifier. The number 1301 in the sample is the campaign id, and the number 1012 is the email id.

Thanks!

SanfordWhiteman
Level 10 - Community Moderator

Re: Successfully BCC'ing Salesforce in outgoing Marketo emails

Thanks for the follow-up, Brad. Yep, if your intent is to reparse the message on your own you can get around it.  But when you use (some) third-party services for mail archiving they'll dump or misclassify it.  Such services are already skeptical of BCC from a compliance standpoint, and a crazy embedded format like that isn't going to make them any happier...