Page 1 of 1

avoid display button in Gmail

Posted: Fri Apr 04, 2008 9:35 am
by vincent99
Hi, I'm in trouble with the file_embedder plugin.
My code is like this:

Code: Select all

 
...
$plugin =& new Swift_Plugin_FileEmbedder();
$plugin->setTagDefinition("img", "src", array("gif", "png", "jpg"));
$swift->attachPlugin($plugin, "file_embedder");
 
$message =& new Swift_Message("Title");
 
$messageTxt = "text message";
 
$message->attach(new Swift_Message_Part($messageTxt ));
/*
$content contains the full html page
where images (in the same server) like:
<img src="/full/path/to/image/header.jpg"  
*/
$message->attach(new Swift_Message_Part($content 'text/html')); 
 
$swift->send($message, $eMail, $sender);
...
 
It works fine in all email clients, but i've display problems in Gmail, such as the "Display Message" button.
Where i'm wrong?

Tnx

Re: avoid display button in Gmail

Posted: Fri Apr 04, 2008 9:57 am
by onion2k
I think GMail hides all the images whatever you do.

Re: avoid display button in Gmail

Posted: Fri Apr 04, 2008 11:24 am
by vincent99
And what about Hotmail? I've the same problem...
Yahoo and other local accounts works perfectly
I cannot understand why

Thanx in advance

Re: avoid display button in Gmail

Posted: Fri Apr 04, 2008 7:23 pm
by Chris Corbyn
I was discussing this with someone else recently. It appeared Gmail was hiding images sometimes but not others. I guessed that it was down to the file size of the image, or the number of them. For gmail to display those embedded images it has some work to do so it probably tries to keep its load down.

Gmail has to extract the image attachment, base64 decode it, write to a file and then change the <img src="..." to reference that file.

I haven't looked into it further, but filesize was my best guess.