I was a bit surprised that this wasn't mentioned before. Some mail clients (Outlook 2007/2010) don't support floats. This is inconvenient for images that you want to wrap text around. The oldschool align=left/right will work, but that option is not present in modern wysiwyg's. So if you want to send an e-mail from your site (e.g. Simplenews) this conversion could really help users.

Could there be an option to convert floated images to align=left/right? So they work in Outlook etc..

CommentFileSizeAuthor
#5 mimemail.code_.1852694-5.patch812 bytesclemens.tolboom

Comments

hanno’s picture

bump. Experience this problem at a client today. Would be a great feature.

http://www.sitepoint.com/forums/showthread.php?776589-Is-there-any-alter...

hanno’s picture

OK, I'm now testing if this works for the client:
after line 140 mimemail_compress.inc after '$node->setAttribute('style', $style);'

        $float = preg_match ('/float:(left|right)/', $style, $matches);
        if ($float)
          $node->setAttribute('align', $matches[1]);
hanno’s picture

Well, that works, but there is no margin around the image and the text. I'm adding vspace and hspace attributes for img, that will hopefully help.

sgabe’s picture

Let me know if you have a working solution and a patch to commit.

clemens.tolboom’s picture

Status: Active » Needs review
StatusFileSize
new812 bytes
sgabe’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Issue summary: View changes
Status: Needs review » Fixed

Committed to both branches, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.