Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove *|MC_PREVIEW_TEXT|* from email title using Mailchimp and or Mandrill

I have created an email template which includes merging tags on MailChimp which then gets published to Mandrill.

When my script runs and I receive email, as you can see, |MC_PREVIEW_TEXT| appears in the title.

image

I have searched both Mandrill and MailChimp for this tag but it is not appearing in either template file.

How do I remove this from the email?

like image 291
Declan Murphy Avatar asked Jul 24 '17 04:07

Declan Murphy


People also ask

How do I get rid of the preview text in Mailchimp?

To remove the preview text on MailChimpIf the Preview text section is left empty, the message *|MC_PREVIEW_TEXT|* will appear on top of the email template.

How do I edit preview text in Mailchimp?

In the Subject section, click Edit Subject. Enter the Subject and Preview text you want to use, and click Save.


1 Answers

I used to do this through Mandrill template editor. enter image description here

Simply remove these lines which appears just after the body opening:

    <!--*|IF:MC_PREVIEW_TEXT|*-->
            <!--[if !gte mso 9]><!----><span class="mcnPreviewText"  
 style="display:none; font-size:0px; line-height:0px; max-height:0px; max-width:0px; opacity:0; overflow:hidden; visibility:hidden; mso-hide:all;">*|MC_PREVIEW_TEXT|*</span>
           <!--<![endif]-->
           <!--*|END:IF|*-->

To know more about this merge tag:
https://kb.mailchimp.com/merge-tags/all-the-merge-tags-cheat-sheet

Use this merge tag to generate preview text in a custom-coded campaign. Insert |MC_PREVIEW_TEXT| just after the opening < body > tag in your HTML. To ensure the preview text isn’t visible in the body of your campaign, wrap the merge tag in a hidden < span > element.

Locate or add < style type= "text / css" > < /script > to your HTML, and add this code to the "style type" value:

After the opening < body > tag, add: enter image description here

Hint: Search in the browser for this text doesn't work for some reason, search for something written in the code didn't work for me on chrome with Mandrill, so unfortunate find it by eye or copy-paste to an external editor.

like image 82
Amr Elgarhy Avatar answered Oct 07 '22 14:10

Amr Elgarhy