开发者

Adding an encapsulated email (like a forwarded email) from Zend Mail

I'm trying to get Zend_Mail to send an encapsulated message - as though it's forwarding an email开发者_Python百科.

$attachedContent = "<h1>H1 Email</h1>";
$emailContent = "<h1>Email Content>";
$mail = new Zend_Mail();
$mail->setBodyText('text content');
$mail->setBodyHtml($emailContent);
$mail->setFrom('kieran@fromz.com.au', 'GAS');
$mail->addTo('kieran@fromz.com.au', 'GAS');
$at = $mail->createAttachment($attachedContent);
$at->type = 'message/rfc822;
  name="forwarded message"';
$at->disposition = Zend_Mime::DISPOSITION_INLINE;
$at->encoding    = Zend_Mime::ENCODING_7BIT;
$mail->setSubject('Test');
$mail->send();

Mail clients are getting the email, rendering the normal HTML content, and displaying the forwarded message and rendering its contents, however, it's formatting like:

<h1>Email Content</h1>

Can you see what I'm doing wrong? I've not found anything online, and have tried my best to copy the formatting from looking at email source.

Cheers,

Kieran


maybe these lines are causing it??

$attachedContent = "<h1>H1 Email</h1>";
$emailContent = "<h1>Email Content>";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜