Export html of final email - not with tokens & variables | Community
Skip to main content
Level 2
March 18, 2019
Solved

Export html of final email - not with tokens & variables

  • March 18, 2019
  • 4 replies
  • 10186 views

I have an email that is quite complex with lots of modules, variables and also uses program token for content. I would like to export the html of a final version of this email, as it will render. However, it doesn't seem possible, as the code edit or html export option only offers the template/base email code with the variables defined. And trying to preview the email doesn't allow me to grab the source either, neither is this possible if sending a test email or through a smart campaign with the "view as web page" link added (get error: Cannot get email content- Customer does not belong to any POD). Does anyone know how I can grab the final code of an email, without having to rebuild it and replace all variables and tokens with actual values? It seems odd that something as basic as this isn't possible, but perhaps someone has a workaround here?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ElinPe

Marketo support has confirmed that the view source option no longer works due a change in the latest release with regards to the mkt-tok, and the fact that it no longer sticks in the url of the page when viewing an email as a web page.

The mkt_tok is still there, but it doesn't stay in the url path of the browser anymore. You can spot it for a split second and then it's gone. This is what support mentioned about this change: "... we confirmed with engineering that this is due to the release and a byproduct of an intended and necessary change for security reasons. The removal of the mkt_tok, was so that the end user "cannot bookmark, forward, or let search engine cache it" according to engineering. Since that value can be used for cookie-ing with Munchkin, it was theoretically possible for the URL to get indexed on a search engine. Meaning anyone who clicked the link would get cookied as that person."

They also confirmed that the approach going forward of getting to the code through a browser would be to save it as a file - view source will not work anymore because of the "missing" token. They did however provide another workaround to mimic the view source code approach I used before, and it works, although requires a bit of cutting and pasting:

  1. Send yourself a test email with the "view as web page" link included.
  2. In the email, right-click this url and copy it.
  3. In the browser, paste "view-source:your-copied-url-from-the-email" into the path.
  4. On that page you will see the complete url with the actual token - copy the entire url.
  5. In the browser, paste "view-source:the-entire-token-url" into the path.
  6. There's the code.

4 replies

SanfordWhiteman
Level 10
March 18, 2019

neither is this possible if sending a test email or through a smart campaign with the "view as web page" link added (get error: Cannot get email content- Customer does not belong to any POD).

You'll need to fix this underlying problem with your View As Web Page -- then there's no reason that VAWP would not work for your described requirement.

Are you using a branding domain? What's an example VAWP URL when you send a real (not sample) email?

ElinPeAuthor
Level 2
March 18, 2019

Thank you, Sanford. That's what I thought - that view as web page would allow me to do this. Can also confirm that we are using a branding domain. I've logged a ticket with support and they are looking into it now. Grabbing the code from the view as a web page is how I've done it before, and nothing in our setup has changed, so I suspect there is a bug somewhere following the latest release.

Tiffany_Phan1
Level 2
March 18, 2019

Hey Elin,

I'm getting the same error message when I try to save an email from the "view as web page" link. I also tried to download my email with the Marketo drop down feature but then my tokens don't populate. I looked it up in the community and found a past conversation where this was issue was called a "bug" by Marketo. View as Webpage does not work: "Customer does not belong to any POD" I just submitted a support ticket for this issue at level P1 because I need to get approval for emails this week and I cannot provide anyone a full working email to review. I would advise to submit a ticket as well which will help raise a flag to this issue.

ElinPeAuthor
Level 2
March 18, 2019

Thanks, Tiffany. I've also logged a support ticket, they are looking into it now. I'll update this post when issue is resolved, or a workaround is found.

ElinPeAuthor
Level 2
March 18, 2019

Update from support: this has to do with the latest release and the removal of the mkt_tok in the url for the view as a web page. They confirmed that the workaround is to save the html, and get to the source code that way. Still a bit of a hassle, but at least it's something. The really annoying part is that the marketo hosted image url's are not complete in the downloaded file, so those have to be added/updated manually in order for images to display correctly when/if sharing externally. Unless anyone knows a smart way of embedding the full image urls for images hosted in the design studio?

Tiffany_Phan1
Level 2
March 18, 2019

Thanks for update Elin! I'm still waiting for support to respond to my ticket.

Glenda_Georgoul
Level 2
April 10, 2019

solution doesn't work for me anymore

May 1, 2019

Same- the file will save, but when trying to attach it as text to an Outlook email, I get and error message about the CSS and the entire email is skewed.