Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Problem with MIME::Entity

Thread Tools

Problem with MIME::Entity

Posts: n/a
Hi, I must prepare an email with header, body and an attachment.
The header is on a text file "head.txt".

my $miment = MIME::Entity -> new ();
my $mimhead = MIME::Head->from_file ("head.txt") || die "error";

$miment -> head ($mimhead); # puts the MIME::Head into MIME::Entity

my $mbody = new MIME::Entity->build(Data => "ciao",
Type => "text/plain",
Encoding => "quoted-printable",);

$miment -> add_part ($mbody); # puts the MIME::Body into MIME::Entity

$miment -> attach (Data => "blabla", # adds the attachment
Type => 'application/xml');

$miment -> print;

the result is:

Date: Tue, 21 Oct 2003 13:41:19 +0200 (ora legale Europa occidentale)
From: Guru03
To: Guru04
Subject: test email
MIME-Version: 1.0
Content-type: multipart/mixed; boundary="----------=_1075373658-1352-0"

This is a multi-part message in MIME format...


Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)

Content-Type: application/xml
Content-Disposition: inline
Content-Transfer-Encoding: base64



The body pard is invalid... that fields above "ciao" (from Content-Type
to X-Mailer) should NOT be shown.

How can I do? I'm getting to be fool...
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem problem problem :( Need Help Mike ASP General 2 05-11-2004 08:36 AM