Re: MIME::Lite Trouble - please guide me
From: Poul Kornmod (pkornmod_at_hotmail.com)
Date: 11/15/03
- Next message: John B. Kim: "Re: MIME::Lite Trouble - please guide me"
- Previous message: Poul Kornmod: "Re: MIME::LITE trouble - please guide me"
- In reply to: John B. Kim: "MIME::Lite Trouble - please guide me"
- Next in thread: John B. Kim: "Re: MIME::Lite Trouble - please guide me"
- Reply: John B. Kim: "Re: MIME::Lite Trouble - please guide me"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 15 Nov 2003 09:24:24 +0100
You just attach it to the message object:
<snip>
$msg = new MIME::Lite
From =>$from,
To =>$to,
Cc =>$cc,
Subject =>$subject,
Type =>'multipart/mixed';
attach $msg
Type =>'TEXT',
Data =>$txt;
while (<@attachment>){
attach $msg
Type =>'text/plain',
Encoding =>'base64',
Filename =>$_,
Path =>$_;
}
# As a string...
$str = $msg->as_string;
# To a filehandle (say, a "sendmail" stream)...
$msg->send;
</snip>
Just to explain that you of cause also can attach more than one file
(looping through the attachment array) otherwise just refer to one file!
Hope this helps?
Brgds
Poul
"John B. Kim" <provicon@earthlink.net> wrote in message
news:JMhtb.1264$n56.1021@newsread1.news.pas.earthlink.net...
> Could anyone tell me how I can attach pdf file using MIME::Lite??
>
> Any help will be deeply appreciated.
>
> Thanks.
>
> John
>
>
- Next message: John B. Kim: "Re: MIME::Lite Trouble - please guide me"
- Previous message: Poul Kornmod: "Re: MIME::LITE trouble - please guide me"
- In reply to: John B. Kim: "MIME::Lite Trouble - please guide me"
- Next in thread: John B. Kim: "Re: MIME::Lite Trouble - please guide me"
- Reply: John B. Kim: "Re: MIME::Lite Trouble - please guide me"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|