MIME::Lite Message Body

From: John (provicon_at_earthlink.net)
Date: 01/20/04


Date: Tue, 20 Jan 2004 01:00:30 GMT

I run the code below, and something strange happens:

use strict;
use MIME::Lite;
use Net::SMTP;
my $from = 'steve@earthlink.net';
my @addweek1 = qw(michael@earthlink.net
     );

my $subject='Issue 11';

for my $address (@addweek1) {
my $msg = MIME::Lite->new (
               From => $from,
               To => $address,

               Subject => $subject,
               Type =>'multipart/related');

$msg->attach (
               Type => 'text/html',
               Path => 'c:/message.html');

MIME::Lite->send('smtp', 'smtp.earthlink.net');
$msg->send();
}

I run the code above, and I opened my Outlook. 1 email came in. And the
email has the sign of attachment: the clip on the left, which means there is
an attachment with an email.

And at the bottom pane, I see the body of email, which I wish to be there.
But if I double click that email, the body is completely blank / disapper,
and the
attachment sign, clip disappears.

What is left out of is an email without anything in the body.

How can I make the body of the email stay in there using the code above??
The reason I am developing above code is rather than inserting HTML email
body, I wish it to be called in. But when I run above code, it is not
working out.

Any help will be deeply appreciated.

Thanks.

Strange..



Relevant Pages