in reply to Dealing with atachments.
Once you have your message constructed with attachments then you need to send it. I prefer to use Net::SMTP to send messages, but there are several other perl modules that can send mail (and several ways of just doing it by hand). If you're already using MIME::Lite the easiest method is to use its built-in send function:use MIME::Lite; # Create a new multipart message: $msg = new MIME::Lite From =>'me@myhost.com', To =>'you@yourhost.com', Cc =>'some@other.com, some@more.com', Subject =>'A message with 2 parts...', Type =>'multipart/mixed'; # Add parts (each "attach" has same arguments as "new"): attach $msg Type =>'TEXT', Data =>"Here's the GIF file you wanted"; attach $msg Type =>'image/gif', Path =>'aaa000123.gif', Filename =>'logo.gif';
If you're interested in delving deeper, O'Reilly has a decent book entitled Programming Internet Email that covers most of the interesting internet e-mail protocols and formats. It has a good chapter on e-mail related Perl modules.$msg->send;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Dealing with atachments.
by Punto (Scribe) on May 18, 2000 at 11:44 UTC | |
by httptech (Chaplain) on May 18, 2000 at 16:24 UTC | |
by lhoward (Vicar) on May 18, 2000 at 15:05 UTC |