List Info

Thread: Best module for sending e-mail?




Best module for sending e-mail?
user name
2005-12-29 16:16:00
> I'm comparing this:
>    my $smtp = Net::SMTP->new('localhost');
>    $smtp->mail($from);
>    $smtp->to($to);
>    $smtp->data();
>    $smtp->datasend($message);
>    $smtp->dataend();
>    $smtp->quit;
>
> To this:
>    open MAIL, "|sendmail -f $from $to";
>    print MAIL $message;
>    close MAIL;
>
> -- 
> Bowie
>
I'm using both form of program. Net::SMTP I'm using if I
don't know if user 
have sendmail or if I want to send more mails in short time
of running 
script.
But for using sendmail I use this

$mailprog = '/usr/sbin/sendmail';
open(MAIL,"|$mailprog -t");
print MAIL "From: "$from_name"
<$from_addr>n";
print MAIL "Reply-To: $from_addrn";
print MAIL "To: "$to_name"
<$to_addr>n";
print MAIL "Subject: $subjn";
print MAIL "MIME-Version: 1.0n";
print MAIL "Content-Type: text/plain;
charset=ISO-8859-2n";
print MAIL "Content-Transfer-Encoding: 8bitnn";
print MAIL win2iso($message),"nn";
close MAIL;

Petr Vileta, Czech republic
(My server reject all messages from Yahoo and Hotmail. Send
me your mail 
from another non-spammer site please.)


_______________________________________________
ActivePerl mailing list
ActivePerllistserv.ActiveState.com
To unsubscribe: http:/
/listserv.ActiveState.com/mailman/mysubs
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )