On Mon, 2005-04-11 at 11:35 -0300, Marcel Mitsuto wrote:
> > Como fazer para for�ar o uso do ASCII completo ?
> > Ou como fazer para enviar emails em HTML ??
> Character sets
> If a message contains non-ASCII characters, the character set being
> used must be declared within the header. Its value can be declared using the
> charset variable. It is normally assumed that this is the terminal
> character set, too. If the latter differs from the one that should be used
> in outgoing mail, the ttycharset variable can be used for its declaration.
> An outgoing message is then converted, resulting in errors when this
> process cannot be done for the entire text; if the message contains NUL
> characters, it is not converted. Attachments are never converted.
> Any mes�sage that is displayed on a terminal is tried to convert, too, with
> characters not in the terminal character set replaced by question marks.
OK, mas isso n�o me ajuda para resolver o caso. Isso � parte da RFC, ou
seja, teoria...
Na pr�tica tive que fazer isso, que era o que eu estava tentando evitar
TER que EU fazer:
#!/usr/bin/perl
use MIME::Lite;
use strict;
die "usage: $0 recipient file [ subject [ message ] ]\n\n" unless
$ARGV[0] && $ARGV[1];
my $recip = $ARGV[0];
my $file = $ARGV[1];
my $subject = $ARGV[2] || "Mensagem da Comiss��o de Divulga��o";
my $message = $ARGV[3] || "Lembrete sobre a progra��o da semana\n";
die "file doesn't exist: $file\n" if $file ne '-' && ! -e $file;
my $top = MIME::Lite->build(Type =>"multipart/mixed",
From => "[EMAIL PROTECTED]",
To => $recip,
Subject => $subject,
);
$top->attach( Data=>$message, Disposition=>'inline');
$top->attach(Path=>$file, Type=>"application/octet-stream",
Encoding=>"base64") unless $file eq '-';
open MAIL, "| /usr/sbin/sendmail -t -oi" or die "open: $!";
$top->print(\*MAIL);
close MAIL;
--
GUS-BR - Grupo de Usuarios Slackware - BR
http://www.slackwarebrasil.org/
http://www.linuxmag.com.br/mailman/listinfo/slack-users