Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^6: MIME::Lite error => SMTP auth() command not supported on smtp.gmail.com

by ted.byers (Scribe)
on Sep 15, 2011 at 02:12 UTC ( #926047=note: print w/ replies, xml ) Need Help??


in reply to Re^5: MIME::Lite error => SMTP auth() command not supported on smtp.gmail.com
in thread MIME::Lite error => SMTP auth() command not supported on smtp.gmail.com

Well, I did as you suggested, renamed Perl64 and installed Perl de novo, and installed the requisite packages, and the result remains the same.

I don't know what else to try


Comment on Re^6: MIME::Lite error => SMTP auth() command not supported on smtp.gmail.com
Re^7: MIME::Lite error => SMTP auth() command not supported on smtp.gmail.com
by keszler (Priest) on Sep 15, 2011 at 03:07 UTC

    The next step I'd recommend is running Wireshark on each box, capturing packets to and from the gmail server. On the workstation you should get the complete set of connect, auth, send, and quit; comparing that with however far the server gets might provide helpful data (different ports, commands, etc). Once you know what is different you'll be closer to figuring out why.

      I suspect something is awry with the security required to set up a TLS session. On the two servers where the script fails, I get everything up to where TLS ought to start, but no TLSv1 packets. On the workstation where all works, I get a large number of TLSv1 packets, followed by those SMTP packets that end it all. But, I am having an aweful time trying to get Wireshark to display/export, only those packets relevant to the SMTP session (but that may be due to the fact I have never used Wireshark before). And, there are a lot of packets exchanged between the workstation and server and the router, many of which are related to the SMTP session, and seem to be duplicated between the router's public IP address and the gmail email server. What sorts of things need I investigate to determine why neither server can establish the TLS connection that smtp.gmail.com apparently needs? Thanks Ted

        To reduce the packets captured to just those that are interesting you need a capture filter. http://wiki.wireshark.org/CaptureFilters has a good explanation; what you want is something like host smtp.gmail.com and port 25 (or 587, 465, etc.)

        Since MIME::Lite->send isn't cutting it, why not use Net::SMTP::TLS directly? Something like:

        sub make_and_send_email{ my ($from, $to,$subject,$message, $path) =@_; use Net::SMTP::TLS; my $un='myun'; my $pw='mypwd'; my $mh='smtp.gmail.com'; my $pt=25; # or 587, 465, etc depending on what gmail uses my $mailer = new Net::SMTP::TLS( $mh, Port => $pt, User => $un, Password => $pw, Timeout => 60, ) or die "Cannot create a TLS mailer instance!\n"; $mailer->mail($from); $mailer->to($to); $mailer->data(); my $msg = MIME::Lite->new( From => $from, 'Reply-to' => $from, To => $to, Subject => $subject, Type => 'multipart/related' ) or die "Cannot create a new email instance!\n"; $msg->attach( Type => 'TEXT', Data => $message, ) or die "Error adding TXT: $!\n"; $msg->attach( Type => 'aplication/pdf', Path => $path, Disposition => 'attachment' ) or die "Error adding PDF: $!\n"; $mailer->datasend($msg->as_string); $mailer->dataend(); $mailer->quit(); }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://926047]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-09-21 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls