Zend Mail Imap: Fetch Body of Multipart?

I have a small "problem" with Zend_Mail_Storage_Imap and MultiPart Mails.

ContentType: multipart/alternative; boundary=f46d043bd88a9f5d9004c87d2ad3

Part 1 has the Text of the Message, but with headers inside the content, so when i try

$part->getContent();

--f46d043bd88a9f5d9004c87d2ad3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hallo

is the result, how to extract the header information now?

Answers


Instead of:

$part->getContent();

do:

$part->getHeader();

to get Headers or if you want ONLY content then:

try:

while ($part->isMultipart()) {
    $part = $message->getPart(1);
}

or

$message = $mail->getMessage($messageNum);

for content without body.

If issue persists, check your mail on mail client's like Gmail. Sometimes, we add header information twice (accidentally) whilst sending the mail.

Hope this helps :)


Need Your Help

How to Write isRoot() method in java

java methods tree binary root

I have created a binary search tree node class. I defined the attributes

It is only uploading first row's file input

javascript jquery

I have a application which you can access here. If you open the application please click on the "Add" button a couple of times. This will add a new row into a table below. In each table row there i...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.