Password Authentication

From: Art Mahanna (amahanna_at_sbcglobal.net)
Date: 10/30/03


To: <beginners@perl.org>
Date: Thu, 30 Oct 2003 14:18:31 -0600


Hello:

I'm attempting to create a CGI script for password requests that will be
sent to my email address using Perl SMTP in a Windows environment on an
Apache web server. My SMTP server requires authentication. I've tried
using the instructions in the documentation, but it's not working. Here's
the message I'm getting:

Software error:
Can't locate Authen/SASL.pm in @INC (@INC contains: D:/Perl/lib
D:/Perl/site/lib .) at D:/Perl/lib/Net/SMTP.pm line 101.
For help, please send mail to the webmaster (amahanna@sbcglobal.net
<mailto:amahanna@sbcglobal.net> ), giving this error message and the time
and date of the error.

Here's the script:

#!d:/perl/bin/perl5.8.0.exe

use strict;
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);

my $email = param("email");
my $name = param("name");
my $redirect = param("redirect");

use Net::SMTP;

my $smtp = Net::SMTP->new('smtp.sbcglobal.yahoo.com');

$smtp->auth('amahanna@sbcglobal.net','mypasswordhere');
$smtp->mail($ENV{USER});
$smtp->to($email);

$smtp->data();
$smtp->datasend("To: $email\n");
$smtp->datasend("\n");
$smtp->datasend("Password Request\n");
$smtp->dataend();
$smtp->quit;

my $name;
my $value;

print "Location: $redirect\n\n";

exit;



Relevant Pages

  • Re: HTTP server
    ... CGIHTTPRequestHandler from the CGIHTTPServer module instead. ... Im having trouble running the following cgi script on windows ... using this http server from ... What was the error message that accompanied the 403 error? ...
    (comp.lang.python)
  • excel export
    ... I am trying to export some data into excel through cgi script, ... The special Perl ... my $format = $workbook->add_format; ... here is the error message: ...
    (comp.lang.perl.misc)
  • Re: .map file is misunderstood as script
    ... > but the map file is misunderstood for script and I get the following ... > cannot execute CGI script ... If you don't want the file to be treated as a CGI script, ...
    (comp.infosystems.www.authoring.cgi)
  • Posting to CGI on a Unix server from an ASP.net page
    ... ASP.net page, and posting that input to a CGI script on an Apache Web Server, ... and than getting a response from that server??? ...
    (microsoft.public.dotnet.languages.vb)