eAuction
  Not just another Perl script
Google
Welcome, Guest. Please Login or Register


If you use eAuction a lot and like it or if you make money from eAuction or from eAuction-related activities ...
then the project asks you for a donation in favor of the further development.



The forums are protected by
AccessControl
(written by Dieter Werner)
Click here if you want to check your IP against the most important RBLs of the net.
Click here in order to visite the AccessControl forums.


<< Visit the international e Auction Marketplace >>
Buy and sell PC and Consumer Electronic components






  HomeHelpSearchLoginRegister
 



Pages: 1
Net::SMTP (Read 776 times)
Caspiel
eAuction Novice
*
Offline

I kind of like Perl,
but were not going
out...

Posts: 1

Net::SMTP
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... Tongue
Back to top
 
 


Advertising
View Profile   IP Logged
Dieter Werner
Administrator
*****
Offline

Dipl. Paranoiac ®

Posts: 1162
Germany
Gender: male
Re: Net::SMTP
Reply #1 - 02/01/05 at 17:09:38
 
You should read the Perl manpage(s) regarding this topic.
Back to top
 
 

Multimedia file viewing and clickable links are available for registered members only!!  You need to Login or Register!!


Greetings from Germany
Dieter Werner




Advertising
View Profile | WWW   IP Logged
witdoc
eAuction Novice
*
Offline

I love Perl

Posts: 1

Re: Net::SMTP
Reply #2 - 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;
} }



#-#############################################
Back to top
 
 


Advertising
View Profile   IP Logged
Pages: 1


If you like eAuction, please Rate it.
If you don't like eAuction, please Rate it too.


1 is being poor and 10 is being excellent


EveryScript

ip-location


AccessControl - Members Only