in reply to Re: Need a Mail::SendEasy example using attachments
in thread Need a Mail::SendEasy example using attachments
use strict; use warnings; use MIME::Lite; my $msg = MIME::Lite->build( From => 'from@mail.address', To => 'recipient@mail.address', Subject => 'some subject', Type => 'multipart/mixed', ); $msg->attach( Type => 'TEXT', Data => "see attached file\n\n" ); $msg->attach( Type => 'AUTO', # change AUTO to your prefered type if +you wish Path => '/path/to/some/file', ); # MIME::Lite->send('smtp', 'some.smtp.host' ); # don't use sendmail, +see POD $msg->send();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Need a Mail::SendEasy example using attachments
by roboticus (Chancellor) on Aug 17, 2006 at 03:49 UTC |