Quicksilver has asked for the wisdom of the Perl Monks concerning the following question:
#! c:\perl\bin\perl.exe use strict; use warnings; use cgi; use Net::SMTP; #constants my $mailserver_url = "foo.bar.baz"; my $to = "foo\@bar"; my $from = "bar\@foo"; my $subject = "Mail time"; my $smtp = Net::SMTP->new('$mailserver_url'); #Sending the message $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"); # done with header $smtp->datasend($name, $company, $country, $email); $smtp->dataend(); $smtp->quit(); # all done. message sent.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Net::SMTP and the undefined value
by moritz (Cardinal) on Jul 30, 2007 at 14:27 UTC | |
by Quicksilver (Scribe) on Jul 30, 2007 at 14:47 UTC | |
Re: Net::SMTP and the undefined value
by vkhera (Novice) on Jul 30, 2007 at 20:57 UTC |