Title: Corrupted emails
Last modified: March 21, 2023

---

# Corrupted emails

 *  Resolved [carryoncoding](https://wordpress.org/support/users/carryoncoding/)
 * (@carryoncoding)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/corrupted-emails/)
 * Hi,
    My notification emails have become corrupted pretty much just as the new
   plugin update (1.9) was installed.
 * Originally, the header of the email was setup like this:
 *     ```
       <!DOCTYPE html>
       <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
           <head>
               <meta charset="UTF-8">
               <meta name="viewport" content="width=device-width,initial-scale=1">
               <meta name="x-apple-disable-message-reformatting">
               <title></title>
               <!--[if mso]>
                   <noscript>
                       <xml>
                       <o:OfficeDocumentSettings>
                       <o:PixelsPerInch>96</o:PixelsPerInch>
                       </o:OfficeDocumentSettings>
                       </xml>
                   </noscript>
               <![endif]-->
               <style>
                   .email-button {
       ```
   
 * But after the update, the notification message body is full of blank lines and
   looks like this:
 *     ```
               <title></title>
               <!--[if mso]>-->
   
   
   
                       96
   
   
   
   
   
                   .email-button {
       ```
   
 * I tried pasting the code back into the message body box, saved it, tried a test,
   and the code was deleted again.
    Please can you help? Thanks, Phil.

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/topic/corrupted-emails/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/corrupted-emails/page/2/?output_format=md)

 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-15986007)
 * Hi [@carryoncoding](https://wordpress.org/support/users/carryoncoding/),
    Thanks
   for your message.
 * Can you please send me the all of the code you’re using in your email via a link
   so I can test this myself?
 *  Thread Starter [carryoncoding](https://wordpress.org/support/users/carryoncoding/)
 * (@carryoncoding)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-15986330)
 * Thanks. The code is now corrupted but I can extract it from an earlier, successful
   email.
 * What mechanism do you mean by “via a link”?
    Cheers, Phil.
 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-15986337)
 * Hi [@carryoncoding](https://wordpress.org/support/users/carryoncoding/),
    Ok,
   thanks.
 * If you can post a link to the code, e.g. a Gist, then I can go there to download
   it rather than pasting a long HTML email which may get sanitised, here.
 *  Thread Starter [carryoncoding](https://wordpress.org/support/users/carryoncoding/)
 * (@carryoncoding)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-15986362)
 * Please see the following gist. It includes a pieced-together version of the correct
   code, followed by a copy of the corrupted code.
 * [https://gist.github.com/Phil-Avalon/115ef24d086d6f5929f5b92d095d8b42](https://gist.github.com/Phil-Avalon/115ef24d086d6f5929f5b92d095d8b42)
 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-15987546)
 * Thanks [@carryoncoding](https://wordpress.org/support/users/carryoncoding/),
   
   I’ve been able to confirm the bug and will look to release an update to fix this
   as soon as it’s ready.
 *  Thread Starter [carryoncoding](https://wordpress.org/support/users/carryoncoding/)
 * (@carryoncoding)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-15989236)
 * 👍
 *  Thread Starter [carryoncoding](https://wordpress.org/support/users/carryoncoding/)
 * (@carryoncoding)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-16056476)
 * Just checking into see what progress there is on this.
    Thanks, Phil.
 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-16057110)
 * Hi [@carryoncoding](https://wordpress.org/support/users/carryoncoding/),
 * Yes, this is currently being worked on and should be released as part of the 
   next update.
 *  Thread Starter [carryoncoding](https://wordpress.org/support/users/carryoncoding/)
 * (@carryoncoding)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-16059330)
 * Many thanks.
 *  Thread Starter [carryoncoding](https://wordpress.org/support/users/carryoncoding/)
 * (@carryoncoding)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-16162431)
 * Hi, just checking in for an update on progress. Problem still exists in ver 1.9.1.
 * Many thanks,
    Phil.
 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-16164800)
 * Hi [@carryoncoding](https://wordpress.org/support/users/carryoncoding/),
 * No update just yet. It’s part of a few larger updates that I want to release 
   at the same time.
    It appears that not all code will be allowed in an email as
   WordPress’s `wp_mail()` function, which BNFW has to use to send notifications
   out as emails, strips some tags. An example of this is the `<!--[if mso]>-->`
   you have in your email. Just a heads-up in case you need to change this after
   the update comes out.
 *  Thread Starter [carryoncoding](https://wordpress.org/support/users/carryoncoding/)
 * (@carryoncoding)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-16171309)
 * Thanks very much for this response.
 * I have tried removing the Lines:
 *     ```
       <!--[if mso]>
       <noscript>
       <xml>
       <o:OfficeDocumentSettings>
       <o:PixelsPerInch>96</o:PixelsPerInch>
       </o:OfficeDocumentSettings>
       </xml>
       </noscript>
       <![endif]-->
       ```
   
 * but when I click “save”, the notification message body continues to be corrupted.
   
   Have you any other thoughts what might be causing this? Thanks, Phil.
 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-16172048)
 * Hi [@carryoncoding](https://wordpress.org/support/users/carryoncoding/),
    Apologies,
   to clarify: you’ll still need to wait for the update for BNFW to come out but
   it was just a heads up that some of your code won’t work with any email in WordPress
   so you may wish to change this or test it when the update is out.
 * Hope this makes sense but just let me know if not.
 *  Thread Starter [carryoncoding](https://wordpress.org/support/users/carryoncoding/)
 * (@carryoncoding)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/corrupted-emails/#post-16178667)
 * OK, thanks.
 * Looking forward to the update!
    Kind regards, Phil.
 *  Thread Starter [carryoncoding](https://wordpress.org/support/users/carryoncoding/)
 * (@carryoncoding)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/corrupted-emails/#post-16467326)
 * Hi again, just checking in to see how things are progressing. Do we have a release
   date for the fix yet?
 * Many thanks,
 * Phil.

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/topic/corrupted-emails/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/corrupted-emails/page/2/?output_format=md)

The topic ‘Corrupted emails’ is closed to new replies.

 * ![](https://ps.w.org/bnfw/assets/icon.svg?rev=2531573)
 * [Customize WordPress Emails and Alerts - Better Notifications for WP](https://wordpress.org/plugins/bnfw/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bnfw/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bnfw/)
 * [Active Topics](https://wordpress.org/support/plugin/bnfw/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bnfw/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bnfw/reviews/)

 * 25 replies
 * 4 participants
 * Last reply from: [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/corrupted-emails/page/2/#post-16516781)
 * Status: resolved