Fixing Post SMTP's Resend Feature Sending Raw HTML Code
Content
A common and frustrating issue reported by users of the Post SMTP plugin is that the "Resend" feature in the Email Log sends emails as raw HTML code instead of a properly formatted message. This guide explains why this happens and outlines the most effective troubleshooting steps.
The Problem: Resending HTML as Plain Text
When users attempt to resend a previously logged email by clicking the "Resend" button, the recipient receives an email filled with the raw HTML and CSS markup. The email's content-type header is incorrectly set to text/plain; charset=UTF-8 instead of text/html, which prevents email clients from rendering the HTML.
Why This Happens
Based on numerous user reports, this appears to be a recurring bug within the Post SMTP plugin itself that has surfaced across multiple versions. The issue is not related to a specific mailer (Gmail, SMTP, etc.) or WordPress environment, as it occurs on a wide variety of setups. The problem specifically lies in how the plugin reconstructs and sends the email message from the log data.
Most Common Solutions and Workarounds
1. Check for the "Broken Email" Fix (Advanced Settings)
Some versions of the plugin include a setting designed to address email formatting issues:
- Navigate to Post SMTP → Settings.
- Click on the Advanced tab.
- Look for a setting labeled "Broken email fix" or similar.
- Ensure this option is enabled, save your settings, and test the resend function again.
2. Test for a Plugin Conflict
While the core issue is likely with Post SMTP, other plugins can sometimes interfere. To rule this out:
- Temporarily disable all other plugins except Post SMTP.
- Switch to a default WordPress theme (like Twenty Twenty-Four).
- Attempt to resend an email from the log. If the HTML is now parsed correctly, reactivate your plugins and theme one by one to identify the culprit.
3. Use an Alternative Resend Method
If the log resend feature is broken, a more reliable workaround is to use the resend function provided by the original source of the email. For example:
- If the email was from a contact form submission</strong (e.g., Contact Form 7, Gravity Forms), resend it from within that form's entry management screen.
- If it was a WooCommerce order notification, resend it from the WooCommerce order details page.
4. Consider a Version Rollback
This bug has been known to appear in certain updates and then get fixed in later ones. User reports indicate that rolling back to a specific version (e.g., 2.4.3) has sometimes resolved the issue. You can download previous versions from the Advanced View on the WordPress.org plugin page. Warning: Always back up your site before downgrading a plugin.
Conclusion
The Post SMTP resend bug is a well-documented issue that affects HTML email rendering. The most direct solution is to use the built-in "Broken email fix" setting if available. If that doesn't work, using the resend feature from the original plugin that sent the email is the most reliable workaround. Since this is a plugin bug, users should keep Post SMTP updated to ensure they receive official fixes as they are released.
Related Support Threads Support
-
HTML not parsed when an email it resent using the “Resend” optionhttps://wordpress.org/support/topic/html-not-parsed-when-an-email-it-resent-using-the-resend-option/
-
Email Log renders markup artefactshttps://wordpress.org/support/topic/email-log-renders-markup-artefacts/
-
resending email shows as raw htmlhttps://wordpress.org/support/topic/resending-email-shows-as-raw-html/
-
HTML Broken in email log previewhttps://wordpress.org/support/topic/html-broken-in-email-log-preview/
-
Old bug comeback since 2.5https://wordpress.org/support/topic/old-bug-comeback-since-2-5/
-
Escaped HTML Resending from PostSMTP Loghttps://wordpress.org/support/topic/escaped-html-resending-from-postsmtp-log/
-
HTML emails looks funny when resendhttps://wordpress.org/support/topic/html-emails-looks-funny-when-resend/
-
Issue with resend functionhttps://wordpress.org/support/topic/issue-with-resend-function/
-
HTML not parsed when resending via Mail Loghttps://wordpress.org/support/topic/html-not-parsed-when-resending-via-mail-log/
-
Resending email from log breaks html of emailhttps://wordpress.org/support/topic/resending-email-from-log-breaks-html-of-email/
-
Update 2.2 destroys E-Mail Layoutshttps://wordpress.org/support/topic/%e2%9d%8c-update-2-2-destroys-e-mail-layouts/
-
Sent emails not recognized as HTMhttps://wordpress.org/support/topic/sent-emails-not-recognized-as-htm/
-
Erroneous line breaks (seen on Mac) with new version 2.3https://wordpress.org/support/topic/erroneous-line-breaks-seen-on-mac-with-new-version-2-3/
-
HTML mails sent as text mailshttps://wordpress.org/support/topic/html-mails-sent-as-text-mails/
-
Email Log UX – Page Refresh + Error Columnhttps://wordpress.org/support/topic/email-log-ux-page-refresh-error-column/
-
After update to Version 2.3.1 the Reply-To header is losthttps://wordpress.org/support/topic/after-update-to-version-2-3-1-the-reply-to-header-is-lost/
-
Viewing logs shows raw html since the move to the new systemhttps://wordpress.org/support/topic/viewing-logs-shows-raw-html-since-the-move-to-the-new-system/
-
Re-send Log Email delivers as plain text.https://wordpress.org/support/topic/re-send-log-email-delivers-as-plain-text/
-
HTML not parsed when an email it resent using the “Resend” optionhttps://wordpress.org/support/topic/html-not-parsed-when-an-email-it-resent-using-the-resend-option-2/
-
Resend sends HTML codehttps://wordpress.org/support/topic/resend-sends-html-code/
-
Resend from Log creates email full of HTMLhttps://wordpress.org/support/topic/resend-from-log-creates-email-full-of-html/
-
resend email drops emoji in subject and replaces with ?https://wordpress.org/support/topic/resend-email-drops-emoji-in-subject-and-replaces-with/