De la documentación de MIME::Lite:
use MIME::Lite;
### Create a new multipart message:
$msg = MIME::Lite->new(
From =>'
[email protected]',
To =>'
[email protected]',
Cc =>'
[email protected],
[email protected]',
Subject =>'A message with 2 parts...',
Type =>'multipart/mixed'
);
### Add parts (each "attach" has same arguments as "new"):
$msg->attach(Type =>'TEXT',
Data =>"Here's the GIF file you wanted"
);
$msg->attach(Type =>'image/gif',
Path =>'aaa000123.gif',
Filename =>'logo.gif'
);
$text = $msg->as_string;
MIME::Lite also includes a method for sending these
things.
$msg->send;
This defaults to using sendmail(1) but can be customized
to use SMTP via the Net::SMTP manpage.
Espero que te sirva :-)
Summergirl
[email protected]
http://foros.fadlan.com