Hello,

I need to extract attachments from emails.

Thereby I encountered a "funny" behaviour. I am using the script
"Mail_display-example" from
<http://ezcomponents.org/docs/api/trunk/Mail_display-example.html>.

When I am parsing emails containing plain text attachments the
attachment is handled is an ezcMailPartText. I expected it to be an
ezcMailPartFile.

Is this behaviour correct? If it is - what is best practice to get the
attachment as a file in a tempory directory as in ezcMailPartFile?

Thanks for your help,

best regards

Sascha


The source code of the email (Mail Client is Thunderbird):

Return-Path: <sen...@example.com>
Received: from lenovo.safri.net (sender.example.com [127.0.0.1])
by mail.example.com (Postfix) with ESMTP id C1E75D5C8A for
  <recipi...@example.com>; Sun,  8 Mar 2009 16:37:34 +0100 (CET)
Message-ID: <49b3e63e.1030...@example.com>
Date: Sun, 08 Mar 2009 16:44:40 +0100
From: Sender Name <sen...@example.com>
MIME-Version: 1.0
To: recipi...@example.com
Subject: subject
Content-Type: multipart/mixed; boundary="------------090609070003050500030603"
Content-Type: multipart/mixed; boundary="------------090609070003050500030603"

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--------------090609070003050500030603
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

content

--------------090609070003050500030603
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="test.txt"

3

--------------090609070003050500030603--

-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to