Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl use MIME::Lite; my $str; ### Create a new multipart message: $msg = MIME::Lite->new( From =>'robert@idi.net', To =>'robert@idi.net', Cc =>'some@other.com, some@more.com', subject =>'Here is an GIF and a text file attachment for you, cour +tesy of MIME::Lite', # Tried all the multipart types... Type =>'multipart/digest', #Type =>'text/plain', Data =>'Included with this email is a text file and a gif.', ); ### Add parts (each "attach" has same arguments as "new") $msg->attach(Type =>'image/gif', Path =>'/home/robert/newsroom.gif', Encoding => "base64", Filename =>'newsroom.gif' ); $msg->attach(Type =>'text/html', Path =>'/home/robert/attachme.txt', Filename =>'attachme.txt' ); $msg->send("smtp");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to separate attachments from the email body
by extremely (Priest) on Feb 08, 2001 at 03:28 UTC | |
|
(jeffa) Re: How to separate attachments from the email body
by jeffa (Bishop) on Feb 08, 2001 at 01:45 UTC | |
|
Re: How to separate attachments from the email body
by Adam (Vicar) on Feb 08, 2001 at 02:24 UTC |