Title: Code appearing in emails
Last modified: June 16, 2019

---

# Code appearing in emails

 *  Resolved [rsk203](https://wordpress.org/support/users/rsk203/)
 * (@rsk203)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/code-appearing-in-emails/)
 * Upgraded to 1.5.2.3 Lite yesterday.
    We use the plugin for a “Contact Us” form.
   All emails we have received since the upgrade contain code with the message.
 * Here is a sample:
 * !doctype html html dir=”ltr” xmlns=”[http://www.w3.org/1999/xhtml&#8221](http://www.w3.org/1999/xhtml&#8221);
   xmlns:v=”urn:schemas-microsoft-com:vml” xmlns:o=”urn:schemas-microsoft-com:office:
   office” head !–[if gte mso 15] xml o:OfficeDocumentSettings o:AllowPNG/ o:PixelsPerInch96/
   o:PixelsPerInch /o:OfficeDocumentSettings /xml ![endif]– meta charset=”UTF-8″
   meta http-equiv=”X-UA-Compatible” content=”IE=edge” meta name=”viewport” content
   =”width=device-width, initial-scale=1″ titleRed Shadow Kennels/title style type
   =”text/css” p{ margin:10px 0; padding:0; } table{ border-collapse:collapse; }
   h1,h2,h3,h4,h5,h6{ display:block; margin:0; padding:0; } img,a img{ border:0;
   height:auto; outline:none; text-decoration:none; } body,#bodyTable,#bodyCell{
   height:100%; margin:0; padding:0; width:100%; } #outlook a{ padding:0; } img{-
   ms-interpolation-mode:bicubic; } table{ mso-table-lspace:0pt; mso-table-rspace:
   0pt; } .ReadMsgBody{ width:100%; } .ExternalClass{ width:100%; } p,a,li,td,blockquote{
   mso-line-height-rule:exactly; } a[href^=tel],a[href^=sms]{ color:inherit; cursor:
   default; text-decoration:none; } p,a,li,td,body,table,blockquote{ -ms-text-size-
   adjust:100%; -webkit-text-size-adjust:100%; } .ExternalClass,.ExternalClass p,.
   ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{ 
   line-height:100%; } a[x-apple-data-detectors]{ color:inherit !important; text-
   decoration:none !important; font-size:inherit !important; font-family:inherit!
   important; font-weight:inherit !important; line-height:inherit !important; } #
   bodyCell{ padding:50px 50px; } .templateContainer{ max-width:600px !important;
   border:0; } a.mcnButton{ display:block; } .mcnTextContent{ word-break:break-word;}.
   mcnTextContent img{ height:auto !important; } .mcnDividerBlock{ table-layout:
   fixed !important; } /***** Make theme edits below if needed *****/ /* Page – 
   Background Style */ body,#bodyTable{ background-color:#e9eaec; } /* Page – Heading
   1 */ h1{ color:#202020; font-family: ‘Helvetica Neue’, Helvetica, Arial, ‘Lucida
   Grande’, sans-serif; font-size:26px; font-style:normal; font-weight:bold; line-
   height:125%; letter-spacing:normal; } /* Page – Heading 2 */ h2{ color:#202020;
   font-family: ‘Helvetica Neue’, Helvetica, Arial, ‘Lucida Grande’, sans-serif;
   font-size:22px; font-style:normal; font-weight:bold; line-height:125%; letter-
   spacing:normal; } /* Page – Heading 3 */ h3{ color:#202020; font-family: ‘Helvetica
   Neue’, Helvetica, Arial, ‘Lucida Grande’, sans-serif; font-size:20px; font-style:
   normal; font-weight:bold; line-height:125%; letter-spacing:normal; } /* Page –
   Heading 4 */ h4{ color:#202020; font-family: ‘Helvetica Neue’, Helvetica, Arial,‘
   Lucida Grande’, sans-serif; font-size:18px; font-style:normal; font-weight:bold;
   line-height:125%; letter-spacing:normal; } /* Header – Header Style */ #templateHeader{
   border-top:0; border-bottom:0; padding-top:0; padding-bottom:20px; text-align:
   center; } /* Body – Body Style */ #templateBody{ background-color:#FFFFFF; border-
   top:0; border: 1px solid #c1c1c1; padding-top:0; padding-bottom:0px; } /* Body-
   Body Text */ #templateBody .mcnTextContent, #templateBody .mcnTextContent p{ 
   color:#555555; font-family: ‘Helvetica Neue’, Helvetica, Arial, ‘Lucida Grande’,
   sans-serif; font-size:14px; line-height:150%; } /* Body – Body Link */ #templateBody.
   mcnTextContent a, #templateBody .mcnTextContent p a{ color:#ff7f50; font-weight:
   normal; text-decoration:underline; } /* Footer – Footer Style */ #templateFooter{
   background-color:#e9eaec; border-top:0; border-bottom:0; padding-top:12px; padding-
   bottom:12px; } /* Footer – Footer Text */ #templateFooter .mcnTextContent, #templateFooter.
   mcnTextContent p{ color:#cccccc; font-family: ‘Helvetica Neue’, Helvetica, Arial,‘
   Lucida Grande’, sans-serif; font-size:12px; line-height:150%; text-align:center;}/*
   Footer – Footer Link */ #templateFooter .mcnTextContent a, #templateFooter .mcnTextContent
   p a{ color:#cccccc; font-weight:normal; text-decoration:underline; } [@media](https://wordpress.org/support/users/media/)
   only screen and (min-width:768px){ .templateContainer{ width:600px !important;}}
   [@media](https://wordpress.org/support/users/media/) only screen and (max-width:
   480px){ body,table,td,p,a,li,blockquote{ -webkit-text-size-adjust:none !important;}}
   [@media](https://wordpress.org/support/users/media/) only screen and (max-width:
   480px){ body{ width:100% !important; min-width:100% !important; } } [@media](https://wordpress.org/support/users/media/)
   only screen and (max-width: 680px){ #bodyCell{ padding:20px 20px !important; }}
   [@media](https://wordpress.org/support/users/media/) only screen and (max-width:
   480px){ .mcnTextContentContainer{ max-width:100% !important; width:100% !important;}}/
   style /head body style=”height: 100%;margin: 0;padding: 0;width: 100%;-ms-text-
   size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #e9eaec;” !–
   Don’t forget to run final template through [http://templates.mailchimp.com/resources/inline-css/](http://templates.mailchimp.com/resources/inline-css/)—
   center table align=”center” border=”0″ cellpadding=”0″ cellspacing=”0″ height
   =”100%” width=”100%” id=”bodyTable” style=”border-collapse: collapse;mso-table-
   lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-
   adjust: 100%;height: 100%;margin: 0;padding: 0;width: 100%;background-color: #
   e9eaec;” tr td align=”center” valign=”top” id=”bodyCell” style=”mso-line-height-
   rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;height:
   100%;margin: 0;padding: 50px 50px;width: 100%;” !– BEGIN TEMPLATE // — !–[if 
   gte mso 9] table align=”center” border=”0″ cellspacing=”0″ cellpadding=”0″ width
   =”600″ style=”width:600px;” tr td align=”center” valign=”top” width=”600″ style
   =”width:600px;” ![endif]– table border=”0″ cellpadding=”0″ cellspacing=”0″ width
   =”100%” class=”templateContainer” style=”border-collapse: collapse;mso-table-
   lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-
   adjust: 100%;border: 0;max-width: 600px !important;” tr td valign=”top” id=”templateBody”
   style=”mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-
   size-adjust: 100%;background-color: #FFFFFF;border-top: 0;border: 1px solid #
   c1c1c1;padding-top: 0;padding-bottom: 0px;” table border=”0″ cellpadding=”0″ 
   cellspacing=”0″ width=”100%” class=”mcnTextBlock” style=”min-width: 100%;border-
   collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-
   adjust: 100%;-webkit-text-size-adjust: 100%;” tbody class=”mcnTextBlockOuter”
   tr td valign=”top” class=”mcnTextBlockInner” style=”mso-line-height-rule: exactly;-
   ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;” table align=”left”
   border=”0″ cellpadding=”0″ cellspacing=”0″ width=”100%” style=”min-width: 100%;
   border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-
   size-adjust: 100%;-webkit-text-size-adjust: 100%;” class=”mcnTextContentContainer”
   tbody tr td valign=”top” style=”padding-top: 30px;padding-right: 30px;padding-
   bottom: 30px;padding-left: 30px;” class=”mcnTextContent” table align=”left” border
   =”0″ cellpadding=”0″ cellspacing=”0″ width=”100%” style=” display:block;min-width:
   100%;border-collapse: collapse;width:100%;” tbody tr td style=”color:#333333;
   padding-top: 20px;padding-bottom: 3px;”strongCould we have your first and last
   name please?/strong/td /tr tr td style=”color:#555555;padding-top: 3px;padding-
   bottom: 20px;”Taylor Tripp/td /tr /tbody /table table align=”left” border=”0″
   cellpadding=”0″ cellspacing=”0″ width=”100%” style=”border-top:1px solid #dddddd;
   display:block;min-width: 100%;border-collapse: collapse;width:100%;” tbody tr
   td style=”color:#333333;padding-top: 20px;padding-bottom: 3px;”strongEmail/strong/
   td /tr tr td style=”color:#555555;
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcode-appearing-in-emails%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [rsk203](https://wordpress.org/support/users/rsk203/)
 * (@rsk203)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/code-appearing-in-emails/#post-11642693)
 * I just tried creating a completely new contact form from scratch and am getting
   the same thing.
    I also tried a blank form with a single line of text. Ditto.
   Emails contain the code
 *  Plugin Support [Ethan Choi](https://wordpress.org/support/users/ethanchoi/)
 * (@ethanchoi)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/code-appearing-in-emails/#post-11645863)
 * Hi rsk203,
 * To troubleshoot the issue, please try the steps described in WPBeginner’s detailed
   guide on [troubleshooting WordPress](https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/).
 * Thanks!
 *  Thread Starter [rsk203](https://wordpress.org/support/users/rsk203/)
 * (@rsk203)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/code-appearing-in-emails/#post-11646558)
 * Unfortunately, that didn’t help.
 * The problem is a function I used to filter the < > symbols out of email that 
   is sent when sent to users when they are added.
    Here is the code.
 * # the following filter removes the <> symbol from an email link.
    # The problem
   was that some email programs like iCloud can’t read the <> characters so throw
   an error # The error appears in the Welcome email for new users
 * add_filter( ‘wp_mail’,’remove_tags’ );
    function remove_tags( $args ){ $args[‘
   message’] = str_replace( ‘<‘, ”, $args[‘message’] ); $args[‘message’] = str_replace(‘
   >’, ”, $args[‘message’] ); return $args; }
 * I am not sure how you are using this function, but removing the <> symbols seems
   to be blowing up your code.
 * Could you tell me how to tweak this function so that your email code is happy,
   iCloud is happy and the default WordPress Users email code is happy.
 *  Plugin Support [Ethan Choi](https://wordpress.org/support/users/ethanchoi/)
 * (@ethanchoi)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/code-appearing-in-emails/#post-11653657)
 * Hi rsk203,
 * Thanks for the update! You could check if there are settings within iCloud to
   enable HTML within the emails. Alternatively, you could switch to a [plain text template in WPForms](http://cloud.supportally.com/5cf4239005e5)
   instead by going to **WPForms > Settings > Emails**.
 * Hope this helps 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Code appearing in emails’ is closed to new replies.

 * ![](https://ps.w.org/wpforms-lite/assets/icon.svg?rev=3254748)
 * [WPForms - Easy Form Builder for WordPress - Contact Forms, Payment Forms, Surveys, & More](https://wordpress.org/plugins/wpforms-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpforms-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpforms-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/wpforms-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpforms-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpforms-lite/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Ethan Choi](https://wordpress.org/support/users/ethanchoi/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/code-appearing-in-emails/#post-11653657)
 * Status: resolved