Well I have done this code, but the messages arrive in white :(, anybody could help me with this please ???. Note: I do not know the list of users for that reason I need multipart.
Regards #!/usr/bin/perl use strict; use warnings; my $msg_html = "message.html"; my $msg_txt = "message.txt"; open (MAIL, "|/usr/sbin/sendmail -t") || die "No hay acceso al binario sendmail\n"; open (HTML, "$msg_html") || die "Html no existe\t$!\n"; open (TXT, "$msg_txt") || die "Txt no existe\t$!\n"; my @html = <HTML>; my @txt = <TXT>; my $boundary = "=_" . time(); $boundary = '"' . '----' . $boundary . '"'; my $To = '[EMAIL PROTECTED]'; my $FromMail = '[EMAIL PROTECTED]'; my $FromName = 'Sender Name'; my $Bcc = '[EMAIL PROTECTED]'; my $Subject = "Testing multipart"; print MAIL "MIME-Version: 1.0\n"; print MAIL "Content-Type: multipart/alternative; boundary= $boundary\n";; print MAIL "From: $FromName<$FromMail>\n"; print MAIL "To: $To\n"; print MAIL "Cc: $Bcc\n"; print MAIL "Subject: $Subject\n"; my $correo = <<"MAIL_BODY"; $boundary Content-Type: text/plain; charset= "iso-8859-1" Content-Transfer-Encoding: 8bit @txt $boundary Content-Type: text/html; charset= "iso-8859-1" Content-Transfer-Encoding: quoted-printable @html $boundary MAIL_BODY print MAIL "$correo\n"; -- _______________________________________________ Get your free email from http://mymail.bsdmail.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>