我正在尝试发送带有图片的电子邮件; 我的电子邮件正文是:
<?php
$message = <<< email
<img src="http://planet-earth.bogus.us/icons/secret.pictures.gif">
Dear {$email},
email;
?>
Run Code Online (Sandbox Code Playgroud)
当我收到电子邮件时,我看不到图片.相反,我明白了<img src="http://planet-earth.bogus.us/icons/secret.pictures.gif">.我知道这是因为<<<电子邮件; 如何使用<<<电子邮件显示图片而不是代码?
UPDATE
我正在使用zend-framework.我的代码看起来像这样:
<?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 …Run Code Online (Sandbox Code Playgroud)