in reply to Net::SMTP - Authentication Problem

Net::SMTP uses Authen::SASL internally to do the authentication. You should check to make sure that this is installed on both machines. Authen::SASL comes in several flavours, including Authen::SASL::Perl (pure perl) and Authen::SASL::Cyrus (using XS to link to the cyrus libraries). Check that you have the same one installed on both systems.

You're not doing any error checking in the above code either. You should make sure that each of the auth(), mail(), to(), and data() functions return a true value, and if they do not, use the $smtp->message() method to get the error message back.

You can use Ethereal to look at what is actually being sent to your mail server too - this is sometimes useful

Replies are listed 'Best First'.
Re^2: Net::SMTP - Authentication Problem
by vi_srikanth (Acolyte) on Aug 29, 2006 at 13:37 UTC

    Please note that both the systems are having same versions of Authen::SASL::Perl.

    I tried $smtp->message. For "new" I get the following output:

    pop.myserver.com PIPELINING SIZE 20480000 VRFY ETRN AUTH PLAIN LOGIN 8BITMIME

    For "auth" I am not getting any return values, instead:

    Unknown callback: 'authname'. (user|auth|language|pass)

    Now, I am trying with Ethereal to troubleshoot this.

    By the way if you have any more suggestions please let me know.

    Thanks