我正在尝试发送带有图片的电子邮件;我的电子邮件正文是:
<?php
$message = <<< email
<img src="http://planet-earth.bogus.us/icons/secret.pictures.gif">
Dear {$email},
email;
?>
当我收到邮件时,我看不到图片。相反,我看到<img src="http://planet-earth.bogus.us/icons/secret.pictures.gif">
. 我知道这是因为 <<< 电子邮件;我如何能够使用 <<< 电子邮件显示图片而不是代码?
更新
我正在使用 zend 框架。我的代码如下所示:
<?php
$mail = new Zend_Mail();
$mail->setFrom('admin@mysite.com', 'My site');
$mail->addTo($recoveryaccount->username);
$mail->setSubject("Mysite");
include "_email_recover_password.phtml";
$mail->setBodyText($message);
$mail->send();
?>
_include "_email_recover_password.pthml"
<?php
$message = <<< email
<img src="http://picturelocation.picture.gif">
Dear {$account->getUsername()},
Somebody has requested that the password associated with this account be
reset. If you initiated this request, click the below link to complete the process:
http://www.example.com/{$account->getRecovery()}
Thank you!
Mysite
Questions? Contact us at admin@mysite.com
email;
?>