"html vs text" Email script fails | Community
Skip to main content
Charles_Sander1
New Participant
June 18, 2018
Solved

"html vs text" Email script fails

  • June 18, 2018
  • 2 replies
  • 4162 views

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

##

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 SanfordWhiteman

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

2 replies

SanfordWhiteman
New Participant
June 18, 2018

(and no, there's nothing that needs escaping, the idea is the output block is redefined for each MIME part)

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
June 18, 2018

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

Charles_Sander1
New Participant
June 18, 2018

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
New Participant
June 19, 2018

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.