in reply to Re^2: receiving email message with an attachment.
in thread receiving email message with an attachment.
Where the body is depends on how the message is composed. Can you post a small but complete example of a message you are having trouble parsing?
For example, here are relevant bits of a message generated by Outlook, with an attachment:
From - Thu Feb 28 17:29:24 2013 From: xxx@yyy.com To: aaa@bbb.com Subject: test Date: Thu, 28 Feb 2013 04:28:38 +0000 Message-ID: <E24D1C1D2311AC43AA14ACFD05622B7694917B@CHEXCHMBX01.x.com> Accept-Language: en-NZ, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Content-Type: multipart/mixed; boundary="_004_E24D1C1D2311AC43AA14ACFD05622B7694917BCHEXCHMBX01cloudh_" MIME-Version: 1.0 --_004_E24D1C1D2311AC43AA14ACFD05622B7694917BCHEXCHMBX01cloudh_ Content-Type: multipart/alternative; boundary="_000_E24D1C1D2311AC43AA14ACFD05622B7694917BCHEXCHMBX01cloudh_" --_000_E24D1C1D2311AC43AA14ACFD05622B7694917BCHEXCHMBX01cloudh_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This is the body of the message. --_000_E24D1C1D2311AC43AA14ACFD05622B7694917BCHEXCHMBX01cloudh_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"= > <meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)"> <style></style> </head> <body lang=3D"EN-NZ" link=3D"blue" vlink=3D"purple"></body> </html> --_000_E24D1C1D2311AC43AA14ACFD05622B7694917BCHEXCHMBX01cloudh_-- --_004_E24D1C1D2311AC43AA14ACFD05622B7694917BCHEXCHMBX01cloudh_ Content-Type: text/plain; name="test.txt" Content-Description: test.txt Content-Disposition: attachment; filename="test.txt"; size=40; creation-date="Thu, 28 Feb 2013 04:28:39 GMT"; modification-date="Thu, 28 Feb 2013 04:28:52 GMT" Content-Transfer-Encoding: base64 VGhpcyBpcyBhIHRleHQgZmlsZSwgYXMgYW4gYXR0YWNobWVudC4NCg== --_004_E24D1C1D2311AC43AA14ACFD05622B7694917BCHEXCHMBX01cloudh_--This is the body of the message.<o:p></o:p>
In this case, the first part of the multipart message has the body of the message twice: first as plain text and then as an HTML formatted message.
But your messages may be quite different from this.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: receiving email message with an attachment.
by tenny1204 (Novice) on Feb 28, 2013 at 06:50 UTC | |
by ig (Vicar) on Mar 04, 2013 at 17:45 UTC |
In Section
Seekers of Perl Wisdom