Posted: November 15, 2013 at 6:01 am
|
Hi, I added a few custom HTML emails under Email Manager and they work really well, however when doing my final Spam Assassin scoring I got a score of 1.5 because of this point: 1.5 MPART_ALT_DIFF_COUNT BODY: HTML and text parts are different Looking at the headers there are 2 versions supplied, one for HTML and one for plain text but both are identical strings of HTML code. I am using the wp_mail function elsewhere with the exact same email HTML and there isn’t a plain text version offered in the headers therefore this 1.5 issue is not flagged. I know this overly picky but I normally provide this client a score of 0.0 and all of the other emails sent using the wp_mail function hit this score. Any pointers would be great, I looked in event-espresso/includes/functions/emai.php but didn’t see anywhere that a plain text version is created. Thanks |
|
Hi Ricardo, It looks like we don’t send a plain text version, just the text/html header. While I understand your desire to hit the 0 figure, 1.5 is an acceptable figure. https://help.aweber.com/entries/21703123-What-Is-a-Good-Spam-Assassin-Score- |
|
I know, I checked the code and only an HTML version is created and supplied to the wp_mail function so it isn’t easy to tell why a plain text version is offered in he headers. The strangest thing is I have 3 setup all the same but with various text and 1 scores 0.0 (which has the same HTML code in the plain text header), but the other 2 are 1.5. Normally I’d be happy with 1.5 but seeing as I know there will be delivery issues with this score and the fact that all my other mails are 0.0, like I said overly picky but if the confirmation emails don’t get through then trying to explain why all but 2 system emails are not being delivered isn’t easy. Cheers |
Hi Ricardo, It turns out that WP adds a text/plain content type by default. This can (and should) be removed via the ‘wp_mail_content_type’ filter. http://codex.wordpress.org/Function_Reference/wp_mail Here is a modified event_espresso_send_email function that can be uploaded to /wp-content/uploads/espresso/custom_functions.php. This will override what is in Event Espresso core and it uses the filter to make sure only text/html gets sent as the content type. While I wasn’t able to see a text/plain content type in the email headers I sent before testing this change, the content type was working as expected. It may be the mail server I’m testing with is ignoring the second content type that WP was adding. |
|
The support post ‘Email headers adding plain text version that is entirely HTML.’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.