我想用圖片發送電子郵件;我的電子郵件的正文是:php用圖像發送電子郵件
<?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">
。我知道這是因爲電子郵件地址爲< < <;我將如何能夠顯示圖片而不是使用< < <電子郵件的代碼?
UPDATE
我正在使用zend-framework。我的代碼如下所示:
<?php
$mail = new Zend_Mail();
$mail->setFrom('[email protected]', '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 [email protected]
email;
?>
不,它實際上沒有任何與'<<< email',更與您的內容類型做。你可以在哪裏發送電子郵件的代碼? – Ryan 2012-04-21 00:53:40