[MIME] How to attach eMails?

G

Guru03

Hi, my question is a bit strange.

I use MIME::Entity to prepare email and send them.

I got an email (put it in a string) and I send it.

But when I open it in certain versions of Outlook the body of attached
email is not shown, and in none of these versions I can see the headers
(but From:, To: and Subject: yes).

i.e., a Mail received:

From: (e-mail address removed)
To: (e-mail address removed)
Date: Mon, 16 Feb 2004 10:56:26 +0100
MIME-Version: 1.0
Subject: rqweqwe
Message-ID: <4030A1DA.19777.7C4729@localhost>
Priority: normal
X-mailer: Pegasus Mail for Windows (v4.12a)
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

prova



with

$myEmail -> attach (Data => $attachment,
Type => 'message/rfc822');

($myEmail is a MIME::Entity object)


the attachment:

------------=_1076925411-23871-9
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

From: (e-mail address removed)
To: (e-mail address removed)
Date: Mon, 16 Feb 2004 10:56:26 +0100
....


the MIME::Entity->stringify is used to send entire email to sendmail.

What's wrong with it?
 
J

James Willmore

I use MIME::Entity to prepare email and send them.
<snip>

I personally use MIME::Lite to send email with MIME attachments. It's
easier to use and you don't need to know much more than what MIME type
you're going to use in the email.

Just my $0.02

HTH

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
One monk said to the other, "The fish has flopped out of the net!
How will it live?" The other said, "When you have gotten out of
the net, I'll tell you."
 
J

James Willmore

Guru03 said:
Ok, but I must return a MIME::Entity object...

No, you don't - that's the beauty of using MIME::Lite - no sendmail required :)

Jim
(jwillmore _at_ adelphia _dot_ net)
 
G

Guru03

(e-mail address removed) (James Willmore) wrote in
No, you don't - that's the beauty of using MIME::Lite - no sendmail
required :)

I'm writing a subroutine that MUST return a MIME::entity object, NOT
MIME::Lite... and it's integrated into an MTA (Postfix, qmail)...
 
T

Tore Aursand

But when I open it in certain versions of Outlook the body of attached
email is not shown, and in none of these versions I can see the headers
(but From:, To: and Subject: yes).

It doesn't _seem_ to be anything wrong with your code, according to what I
know about MIME::Entity.

But have you tried reading the same email message in other email clients
than Outlook? I don't trust Outlook when it comes to "does it work when
sending an email like this?" stuff. :)


--
Tore Aursand <[email protected]>
"Scientists are complaining that the new "Dinosaur" movie shows
dinosaurs with lemurs, who didn't evolve for another million years.
They're afraid the movie will give kids a mistaken impression. What
about the fact that the dinosaurs are singing and dancing?" -- Jay
Leno
 
G

Guru03

But have you tried reading the same email message in other email clients
than Outlook? I don't trust Outlook when it comes to "does it work when
sending an email like this?" stuff. :)

I verified that Outlook 2000 SP1 has a bug, not viewing correctly the email
attachments. 2000 (NOT SP1) and 2000 SP3 works.
 
T

Tore Aursand

I verified that Outlook 2000 SP1 has a bug, not viewing correctly the
email attachments. 2000 (NOT SP1) and 2000 SP3 works.

So it wasn't a Perl (or -related) problem at all? Maybe you should verify
that _your_ application works against other application that _works_ next
time? :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top