in reply to Authen::SASL error

Where did all the newlines go?

The stuff you pasted seems very disconnected from itself and unlike anything I see in the documentation -- typical Khen1950fx junk -- sorry about that, I usually try to point-out his nonsense, but I shy away from email threads

What you want to try is delete all SASL stuff from you code and add only this

$NetSMTP->auth( $user, $pass );
and Net::SMTP will try to load Authen::SASL... if the remote server demands it... and it should just work.

Through UTSLing I learned you can also write  $NetSMTP->auth( Authen::SASL->new(...) ); if you need more customization

If it doesn't, well, you'll need to copy Net::SMTP_auth exactly

as I can't ask multiple ISP's for our customers to install SMTP_auth.

See also Yes, even you can use CPAN, Top 11 (GOOD) reasons not to use someone else's Modules, Top Seven (Bad) Reasons Not To Use Modules

Replies are listed 'Best First'.
Re^2: Authen::SASL error
by mwhiting (Beadle) on Jul 03, 2012 at 22:55 UTC
    OK, so I tried that. I think I did try it once before too and I still get the same result now as I did back then (without all the other output):

    Cannot find a SASL Connection library at PERL2EXE_STORAGE/Net/SMTP.pm line 137

    Note that I am using a program to compile my perl code into an exe to run on Windows (called Perl2exe), so I have to explicitly tell it to include things sometimes. I already have included Authen/SASL.pm with it, but it still seems to be missing something.

      Cannot find a SASL Connection library at PERL2EXE_STORAGE/Net/SMTP.pm line 137

      Kind of important detail, eh? :)

      First things first, does it work outside of perl2exe?

      I already have included Authen/SASL.pm with it, but it still seems to be missing something.

      You probably need to add more, like all installed Authen::SASL::* modules and their deps .... I don't use perl2exe so i don't know how smart it is, but scandeps -x file.pl can help you generate a fairly complete list for perl2exe

      I prefer PAR or http://www.cavapackager.com/ even though cava website is half-there ATM )

        Anonymous Monk - I installed the Scandeps module on my local machine to try this out but I don't seem to get any output. My little program is this:

        use Module::ScanDeps; my $hash_ref = scan_deps( files => [ 'c:\libsearch-work.cgi' ], recurse => 1, ); print "start:"; while (($key, $value) = each(%{$hash_ref})) { print $key.", ".$value."<br />"; }
        But I get no output (other that the 'start:', just to tell me it's there.) Am I missing something in how to operate this ScanDeps machine? (I did try it on a linux server, and it works, though it says permission denied, but it doesn't seem to be lacking a module). Thanks - I appreciate your help in this .... muchly :)
        Trying to reply again.
Re^2: Authen::SASL error
by mwhiting (Beadle) on Jul 06, 2012 at 14:03 UTC

    Anonymous Monk - I installed the Scandeps module on my local machine to try this out but I don't seem to get any output. My little program is this:

    use Module::ScanDeps; my $hash_ref = scan_deps(files => [ 'c:\libsearch-work.cgi' ], recurse => 1, ); print "start:"; while (($key, $value) = each(%{$hash_ref})) { print $key.", ".$value."<br />"; }

    But I get no output (other that the 'start:', just to tell me it's there.) Am I missing something in how to operate this ScanDeps machine? Thanks - I appreciate your help in this .... muchly :)

    (I also find that I can't post replies to the most recent reply on this thread, so I did it here.)