Enviar correo desde Perl

Ernesto Hernandez-Novich emhn at telcel.net.ve
Wed Apr 9 15:48:58 CDT 2003


On Wed, 9 Apr 2003, Francisco Obispo wrote:
> Yo utilizo el Mail::Sender, me parece bastante bueno, y
> tiene algunos metodos como SendFile para enviar attachments
> directamente.

Bueno, para mandar archivos multiparte prefiero MIME::Entity
(apt-get install libmime-perl), que aprovecha Mail::Mailer

$e = MIME::Entity->build(Type => 'multipart/mixed',
                         From => 'foo at bar.com',
                         To   => 'baz at qux.net',
                         Subject => 'Mensaje con anexos');
$e->attach(Type => 'text/plain', Path => '/some/file.txt');
$e->attach(Type => 'application/postscript', Path => '/some/page.ps');
$e->attach(Type => 'audio/mpeg', Path => '/some/song.mp3');
		 ...
$e->smtpsend(Host => 'mi.mail.server');

Como igual tengo que usar encapsulado MIME para otras aplicaciones, me
dió uniformidad, así que me acostumbré a usarlo.
-- 
Ernesto Hernández-Novich - Running Linux 2.4.19 i686 - Unix: Live free or die!
Geek by nature, Linux by choice, Debian of course.
If you can't apt-get it, it isn't useful or doesn't exist.
GPG Key Fingerprint = 438C 49A2 A8C7 E7D7 1500 C507 96D6 A3D6 2F4C 85E3
¿Sabe leer? Elimine mi firma de sus respuestas; sé quién soy ;)

------------------------------------------------------------------------
Enviar e-mail a <majordomo at pm.org> colocando en el cuerpo:
"UNSUBSCRIBE caracas-pm-list" para desuscribirse.
"INFO caracas-pm-list" para conocer las reglas de etiqueta.
------------------------------------------------------------------------



More information about the caracas-pm mailing list