The eAuction Support Forums
https://www.everyscript.de/cgi-bin/yabb/YaBB.pl
eAuction 1.6.1.x >> Addon Proposals >> Net::SMTP
https://www.everyscript.de/cgi-bin/yabb/YaBB.pl?num=1107213614

Message started by Caspiel on 02/01/05 at 00:20:13

Title: Net::SMTP
Post by Caspiel on 02/01/05 at 00:20:13

Is there a simple way to implement Net::SMTP with the code?
I've tried and tried but just can't quite get it... :P

Title: Re: Net::SMTP
Post by Dieter Werner on 02/01/05 at 17:09:38

You should read the Perl manpage(s) regarding this topic.

Title: Re: Net::SMTP
Post by witdoc on 04/02/05 at 06:33:40

#-#############################################
# SUB: Send E-mail
# This is a real quick-and-dirty mailer that
# should work on any platform.  It is my first
# attempt to work with sockets, so if anyone
# has any suggestions, let me know!
#
# Takes:
# (To, Subject, From, Message)

sub sendemail {
my ($to,$from,$subject,$message) = @_;
my $smtp;
if ($config{'mailhost'}) {
use Net::SMTP;
$smtp = Net::SMTP->new($config{'mailhost'});
$smtp->mail($from);
$smtp->to($to);
$smtp->data();
$smtp->datasend("To: $to\n");
$smtp->datasend("From: $from\n");
$smtp->datasend("Subject: $subject\n");
$smtp->datasend("\n"); $smtp->datasend("$message\n"); $smtp->dataend();
$smtp->quit;
}
else {
open MAIL, "$config{'mailprog'}";
print MAIL "To: $to\r\nFrom: $from\r\nSubject:
$subject\r\n\r\n$message\r\n.\r\n";
close MAIL;
} }



#-#############################################

The eAuction Support Forums » Powered by YaBB 2.2!
YaBB © 2000-2007. All Rights Reserved.