Discussion:
[fw-general] Linked images in Email
Nico Edtinger
2007-08-22 17:04:04 UTC
Permalink
Hi Michael!

You'd normally use attach your image and use the content-id to embed
it in your HTML mail.

The Content-Id can be set via the id property of your mail part:
$part->id = $content_id;
It's then possible to use a cid URI to refer to if like:
$body .= "<img src='cid:$content_id' />";

This works with all mail clients, that display HTML mails.

nico
I'm trying to add linked images to an email. Using Zend_Mail
$body = '<html><head></head>
<body><table width=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=19%><img src=http://www.something.com/images/
image.jpg> </td>
</table></body></html>';
$subject = 'test';
$mail = new Zend_Mail ();
$mail->addTo ($email);
$mail->setSubject ($subject);
$mail->setBodyHtml ($body);
try {
$mail->send();
} catch (Exception $e) {
echo $e;
}
This does not display the image in the email using Thunderbird as
the email client. Can anyone point me in the right direction?
Thanks in advance for the help,
Mike
<mike.vcf>
Loading...