• Resolved inspired888

    (@inspired888)


    Hi there,

    I inadvertently left FluentSMTP in disabled mode for over a month.

    There’s around 120 important emails that ended up not sent. I have them all in the logs, and I can view their content perfectly fine in the logs. Yet when I use the “Resend” feature, the email received is all raw HTML.

    E.g.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office" lang="en-US">
    <head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1" name="viewport">
    <meta name="x-apple-disable-message-reformatting">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" charset=UTF-8>
    <meta content="telephone=no" name="format-detection">
    <title>Daily Security Digest</title><!--[if (mso 16)]>
    <style type="text/css">
    a {
    text-decoration: none;
    }
    </style>
    <![endif]--><!--[if gte mso 9]>
    <style>sup {
    font-size: 100% !important;
    }</style><![endif]--><!--[if gte mso 9]>
    <xml>
    <o:OfficeDocumentSettings>
    <o:AllowPNG></o:AllowPNG>
    <o:PixelsPerInch>96</o:PixelsPerInch>
    </o:OfficeDocumentSettings>
    </xml>
    <![endif]-->
    <style type="text/css">
    #outlook a {
    padding: 0;
    }
    
    .es-button {
    mso-style-priority: 100 !important;
    text-decoration: none !important;
    }
    
    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;
    }
    
    .es-desk-hidden {
    display: none;
    float: left;
    overflow: hidden;
    width: 0;
    max-height: 0;
    line-height: 0;
    mso-hide: all;
    }
    
    [data-ogsb] .es-button.es-button-1 {
    padding: 20px 40px !important;
    }
    
    @media only screen and (max-width: 600px) {
    p, ul li, ol li, a {
    line-height: 150% !important
    }
    ...

    That’s just some lines from the start of the received email.

    It’s super important I be able to send these emails out, but obviously I need to resolve why they are not formed correctly.

    Please advise.

    Thanks …. Jonathan

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter inspired888

    (@inspired888)

    This issue appears to be server specific.

    It’s not occurring on another site I manage, which is on a different server configuration. It also continues to occur on the site in question even with all other plug-ins disabled, and using just a default WordPress theme.

    So it doesn’t appear to be a plugin conflict, nor a theme / custom theme code issue.

    Thread Starter inspired888

    (@inspired888)

    I can see that the emails (the resent emails) have their content-type set to text/plain. Obviously that should be set to text/html.

    As a temporary workaround/solution, I have added code the forces all emails to have the text/html value in the content-type header.

    E.g.:

    add_filter( 'wp_mail_content_type', 'set_html_mail_content_type' );
    
    function set_html_mail_content_type() {
        return 'text/html';
    }

    Ideally this code wouldn’t be required, as it may cause issues if at some stage a text email is intentionally sent. Not likely on this particular site, but as it’s a hack/workaround it would be good to resolve the underlying cause instead.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Resend email feature seems broken (sends raw HTML)’ is closed to new replies.