12 Replies Latest reply on Jun 19, 2018 11:27 AM by Charles Sanderson

    "html vs text" Email script fails

    Charles Sanderson

      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
      ##
      
        • Re: "html vs text" Email script fails
          Sanford Whiteman

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

            • Re: "html vs text" Email script fails
              Charles Sanderson

              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.

              1 of 1 people found this helpful
                • Re: "html vs text" Email script fails
                  Sanford Whiteman

                  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.

                  • Re: "html vs text" Email script fails
                    Sanford Whiteman

                    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?

                    1 of 1 people found this helpful
                      • Re: "html vs text" Email script fails
                        Charles Sanderson

                        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.

                          • Re: "html vs text" Email script fails
                            Sanford Whiteman

                            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.

                              • Re: "html vs text" Email script fails
                                Charles Sanderson

                                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.

                        • Re: "html vs text" Email script fails
                          Charles Sanderson

                          ugh... and to further complicate things. I can't seem to find any easy way to switch to receiving plain text on my Outlook. I'm on a mac, and the option isn't anywhere I can find. I had to have somebody on pc do the above test

                        • Re: "html vs text" Email script fails
                          Sanford Whiteman

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