SOLVED

"html vs text" Email script fails

Go to solution
Charles_Sander1
Level 4

"html vs text" Email script fails

I'm trying out a solution posted here: https://blog.teknkl.com/polymorphic-tokens/

Everything seems fine while previewing in Marketo, but when I send a test (html and text) to my Outlook or a Gmail acount, the Text version is giving html version, written out. It looks like the script fires, but only gives the first, html version.   If so, I've got a back-end problem of how to provide 'text version' for proofing.

Or maybe there's something in the html that needs to be escaped?

Here's the script:

#if( !$intro_one ) #define ( $intro_one )

## HTML version

<div style="padding-right: 25px; margin-right: 0px; border-right: 1px solid #383a3c;">

<p><span style="font-size: 16px; color: #999999;"><strong></strong></span></p>

<p style="line-height: 22px;">Lorem Ipsum</p>

</div>

#end

#else #define ( $intro_one )

## Text version

Lorem Ipsum

#end

#end

$intro_one

##

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: "html vs text" Email script fails

Charles, are you seeing the same with a real (non-test) email?

View solution in original post

12 REPLIES 12
SanfordWhiteman
Level 10 - Community Moderator

Re: "html vs text" Email script fails

Charles, are you seeing the same with a real (non-test) email?

Charles_Sander1
Level 4

Re: "html vs text" Email script fails

Ah, ok...Looks like a live test to smart campaign did work.

So, It's just the sample email tests that don't. I'll have to think of a way to streamline my proof process, rather than having to change settings every time I make proofs. Currently I send myself an HTML and text version to pdf for providing to project managers for approval process - so this makes that a little more unwieldy.

SanfordWhiteman
Level 10 - Community Moderator

Re: "html vs text" Email script fails

Ah, ok...Looks like a live test to smart campaign did work.

Yeah, I never use Send Sample if there's any (user-authored) Velocity in an email, since the way Samples are assembled differs from regular outbound messages.

Still, there ought to be some way to make this particular application (polymorphic tokens with otherwise static text) work.

Let me look into it and post back and/or update that blog post.

SanfordWhiteman
Level 10 - Community Moderator

Re: "html vs text" Email script fails

OK, let's rewind for a sec, Charles.

If you send a Text-Only proof of a message, but you're planning to send the message using Marketo's default multipart format (HTML part and Text part) then that Text-Only version isn't accurately representing what the end-user will receive in production. 

Also, the Text-Only version is no more "texty" than the Text part of multipart. This is because Marketo still sends a multipart/alternative formatted message with Text-Only. It just includes only one part in this case. (As opposed to the wider world of SMTP, where "Text Only" can mean a text/plain formatted message, which never supports multiple parts, period.)

So my question is: why aren't you testing with the regular Send Sample (which sends multipart w/2 active parts), since that's what you'll do at go-live, and having the PDF include both pages?

Charles_Sander1
Level 4

Re: "html vs text" Email script fails

I am testing with Send Sample--that's my standard procedure. I click the checkbox to also receive the text version. Then I make pdf files of the two versions - html and text for our proofing process.

My concern is with using the polymorphic tokens instead of the standard two-token solution, because it seems I can't use the Send Sample to make my proofs, as the text version contains html. I was just hoping for a way to generate a text version without having to add steps,  which is part of my intent behind using the polymorphic token.

SanfordWhiteman
Level 10 - Community Moderator

Re: "html vs text" Email script fails

But without checking the Text-Only box, you're still getting both parts is what I'm saying. You get a single sample that's the same as what you'll send in production: multipart, 2 parts.

The Text-Only box generates a version that you'll never send unless you mark the email itself as having no HTML (ever): multipart-capable but only 1 part.

A PDF library will be able to read both parts of the standard sample if config'd correctly.

Charles_Sander1
Level 4

Re: "html vs text" Email script fails

I understand what you're saying about the HTML version sending multipart...what I'm not understanding now, is how I'm to make a adobe pdf that physically shows both versions for a non-coder to easily view and make notations on, page one being html, page two being text?

Edit: to clarify, I open each email in Outlook and use the print option to save to pdf. I don't see any other method to do this. I'm happy to try another method if there's some reconfiguring that'll eliminate a step.

SanfordWhiteman
Level 10 - Community Moderator

Re: "html vs text" Email script fails

Edit: to clarify, I open each email in Outlook and use the print option to save to pdf.

I see. I think you may want to install a different mail client for this that can switch between HTML and Text views with just a click.

In my beloved mail app, The Bat!, for example, I have 2 clickable tabs.

pastedImage_1.png

Maybe a macro + button in Outlook?

Charles_Sander1
Level 4

Re: "html vs text" Email script fails

makes sense.. unfortunately, also a bummer. Outlook 2016 for Mac doesn't provide a way to run macros, and I can't install another mail client due to security limitations.

Gonna mark an answer right on the primary question above and give up on this one for now.