nodesman / wp-autoresponder

Email marketing and newsletter plugin for WordPress
40 stars 22 forks source link

Images are screwed up using autoresponder rich text message #251

Closed guydumais closed 11 years ago

guydumais commented 11 years ago

When using HTML (Rich Text Message) in an autorespnder message, the images are screwed up in Outlook.com and GMail.

I have tried with .png (transparent / not transparent) and with .JPG.

I sent the html Template with another email software and it's showing up properly in Outlook.com and GMail.

Do you have any idea?

Thank You!

nodesman commented 11 years ago

Please post a picture of what you see and link to the msg file if you can.

If you can get the raw email content, please post that also. On Apr 29, 2013 11:16 AM, "Guy Dumais" notifications@github.com wrote:

When using HTML (Rich Text Message) in an autorespnder message, the images are screwed up in Outlook.com and GMail.

I have tried with .png (transparent / not transparent) and with .JPG.

I sent the html Template with another email software and it's showing up properly in Outlook.com and GMail.

Do you have any idea?

Thank You!

— Reply to this email directly or view it on GitHubhttps://github.com/nodesman/WP-Autoresponder/issues/251 .

guydumais commented 11 years ago

Guy-Dumais-Bug

This image is supposed to contains my profile picture. Only the top of my head is showing up!

nodesman commented 11 years ago

@guydumais I think the image may not have been uploaded proplery. Could you post the source URL of the image on your server?

guydumais commented 11 years ago

http://guydumais.com/wp-content/uploads/2013/04/Guy-Dumais_Photo_3.png

guydumais commented 11 years ago

Weird, in the RAW EMAIL CONTENT the image is coded like this: < img src=3D"cid:1367212= 690.517e02925c1f3@guydumais.com" width=3D"124" height=3D"124" / >

In my HTML TEMPLATE it is coded this way: < img src="http://guydumais.com/wp-content/uploads/2013/04/Guy-Dumais_Photo_3.png" width="124" height="124" / >

I'm using MANDRILL to send my email and checked all the options but didn't find any option related to image processing. But when I send the exact same HTML TEMPLATE using their test button, at the same outlook address, the email shown correctly.

Maybe it comes from this: width=3D"124" height=3D"124" .

guydumais commented 11 years ago

ok, confirmed, NOT coming from: width=3D"124" height=3D"124"

but because the images src are replaced with this: < img src=3D"cid:1367212= 690.517e02925c1f3@guydumais.com"

instead of:

< img src="http://guydumais.com/wp-content/uploads/2013/04/Guy-Dumais_Photo_3.png" width="124" height="124" / >

guydumais commented 11 years ago

Here's the FIX: In file: /wp-content/plugins/wp-responder-email-autoresponder-and-newsletter-plugin/lib/mail_functions.php at line 68 replace the '1' in the code here under by a '0' $query = "INSERT INTO $tableName (from,fromname, to, reply_to, subject, htmlbody, textbody, headers,attachimages,htmlenabled,email_type,delivery_type,meta_key,hash,sid) values ('$from','$fromname','$to','$reply_to','$subject','$htmlbody','{$parameters['textbody']}','$headers',1,'$htmlenabled','$email_type','$delivery_type','$meta_key','$hash','$sid');";

Tested and working!

It turns out that there's a bug in the image ATTACHMENT processing. By setting this value to 0, now the images are no more attached but the URL are used instead.

Would be useful to add a setting parameter Under SETTINGS to disable images attachment for those like me who are experiencing the same problems.

Excellent software by the way. Are you planning to enable multilingual support in the future?

Thanks!

nodesman commented 11 years ago

Fixed. This will default to not attach images in next version. I'll look into provision to attach images in a future version.