Comments (9)
I have version 2.2 and when I send the email through MailPoet, it does not send the mail with HTML. When I click on the link to preview in browser, the email generated is HTML only. The HTML is getting stripped in between.
Did this issue resolved OR I am missing something ?
from wordpress-sparkpost.
With MailPoet set up to send through "third party" using SMTP injection authentication, html emails work.
Also, WooCommerce html emails are correctly sent as html when the SparkPost plugin is configured to use the HTTP API.
from wordpress-sparkpost.
I've encountered this myself and have confirmed the API sending is stripping the HTML. Below are the three examples (native, via API, and via SMTP) doing the same "reset password" link.
native
via API
via SMTP
from wordpress-sparkpost.
@pjv thanks for your input. Yes, if any plugin or scripts, explicitly set content type using the filter, it will work. However, we'll have to figure out why core emails are not working alike.
@norcross Thanks for confirming :). We'll prioritize and address this soon.
from wordpress-sparkpost.
@norcross Actually, the problem is the opposite to what is described here. WordPress emails like forget password email, are plain/text emails. however, our plugin is setting that as html. As a result the whitespaces are ignored.
from wordpress-sparkpost.
In case this helps, I remember a similar issue coming up some time ago with the Mandrill plugin. We worked around it using some code in functions.php that leveraged a filter in the mandrill plugin and ran the message through php's nl2br function like so:
function wd_mandrill_woo_order( $message ) {
if ( in_array( 'wp_WC_Email->send', $message['tags']['automatic'] ) ) {
$message['html'] = $message['html'];
} else {
$message['html'] = nl2br( $message['html'] );
}
return $message;
}
add_filter( 'mandrill_payload', 'wd_mandrill_woo_order' );
from wordpress-sparkpost.
@pjv thanks 👍 . I think a solution like that will solve the whitespace problem. But that still treating a text mail as html mail.
Also, at this point our plugin does not have own hooks. In future we'll add support for that. I've already solved this issue but will do little more tests. Thanks :).
from wordpress-sparkpost.
V2.0.1
released with a fix to this problem. Thanks everyone 👍
from wordpress-sparkpost.
I am in the same boat as @dheerajsharma14 - I am using Mailgun to send - all the emails send fine but as raw html. I am up to date with the plugin as well.
from wordpress-sparkpost.
Related Issues (20)
- Newly installed sparkpost plugin, getting SSL error: Failed to enable crypto HOT 3
- Show admin-wide alert if plugin is not ready to send!
- BuddyPress not sent with SparkPost HOT 3
- Why is Content-Type unsupported? HOT 9
- API Transmission Endpoint Changes HOT 2
- Retry transmissions after 5xx Error HOT 1
- Sparkpost replaces the url with a custom url HOT 3
- Emails could not be sent. htmlentities() expects parameter 1 to be string, array given in xxx HOT 8
- Missing assets folder in plugin installation HOT 6
- Retry transmissions after cURL error
- QUIT
- Sparkpost for only one contact form?
- reply-to not working
- Disable SparkPost mailer using a PHP constant
- Plugin uses incorrect bounce domain HOT 1
- Wondering if this plugin is still being maintained? HOT 1
- Deprecated notice on WP 5.5 HOT 2
- Fatal error: Uncaught Error in PHPMailer HOT 2
- official 3.2.8 tagged release
- Authenticated (Administrator+) Stored Cross-Site Scripting via plugin settings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress-sparkpost.