开发者

How to forward mail message using Zend Mail?

开发者 https://www.devze.com 2023-03-30 15:31 出处:网络
How do I forward Zend Mail Message using Zen开发者_StackOverflow社区d Mail? I\'ve found similar question with one answer, but this solution does not work (the body content is encoded)You will need to

How do I forward Zend Mail Message using Zen开发者_StackOverflow社区d Mail?

I've found similar question with one answer, but this solution does not work (the body content is encoded)


You will need to decode the body of the email message.

$content = $part->getContent();
        try {
            switch ($part->contentTransferEncoding) {
                case 'base64':
                    $content = base64_decode($content);
                    break;
                case 'quoted-printable':
                    $content = quoted_printable_decode($content);
                    break;
            }
        } catch(Zend_Mail_Exception $e) { } //content encoding header not set 
0

精彩评论

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

关注公众号