Hi. I add my
use CGI::Carp qw(fatalsToBrowser);
and I got:
Can't locate Net/SMTP_auth.pm in @INC (@INC contains: C:/Perl64/site/lib C:/Perl64/lib .) at C:\HostingSpaces\zlinkexc\mortgagerefinancingpros.com\wwwroot\cgi-bin\smtp2.cgi line 5.
BEGIN failed--compilation aborted at C:\HostingSpaces\zlinkexc\mortgagerefinancingpros.com\wwwroot\cgi-bin\smtp2.cgi line 5.
For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.
!C:\Perl\bin\perl.exe -w
use CGI::Carp qw(fatalsToBrowser);
use Net::SMTP_auth;
$smtpserver = 'mail.mortgagerefinancingpros.com';
my $ServerAccount = "admin\@mortgagerefinancingpros.com";
my $ServerPwd = "pianos78997";
my $smtp = Net::SMTP->new($smtpserver, Hello => "mortgagerefinancingpr
+os.com", Debug
+ => 1);
$smtp->auth('CRAM-MD5', '$ServerAccount', '$ServerPwd');
$recipient = 'admin@mortgage-pros.com' ;
$from = 'admin@mortgagerefinancingpros.com' ;
#$smtp = Net::SMTP->new('',
Timeout => 60,
Debug => 1);
## smtp server requires authentication
#$smtp->auth('admin@mortgagerefinancingpros.com','pianos78997');
$smtp->mail($from);
$smtp->to($recipient);
$smtp->data();
$smtp->datasend("To: $recipient\n");
$smtp->datasend("Subject: test message\n");
$smtp->datasend("\n");
$smtp->datasend("A simple test message\n");
$smtp->dataend();
$smtp->quit;