Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^2: SMTP authentication miseryby tirwhan (Abbot) |
on Nov 20, 2009 at 19:09 UTC ( [id://808504]=note: print w/replies, xml ) | Need Help?? |
Looking at the dump, the "plain" password doesn't look plain to me. If it was plain it would be 'plaintext_pw_here'. Wrong. PLAIN authentication requires the username and password to be sent as a NULL-separated string encoded in base64. You can get a valid authentication string like this by running the following on the command line. perl -MMIME::Base64 -e 'print encode_base64("\000localpart\@domain.com\000password")'<Reveal this spoiler or all in this thread>
You probably want to run the auth_types() function from Net::SMTP_auth to find out exactly what values you can use for the auth type when interacting with that server No need for that either, the dump output clearly tells him: 250-AUTH LOGIN PLAIN XYMCOOKIEsays he can either use the LOGIN, PLAIN or XYMCOOKIE methods The problem he is having is most probably due to the fact that he says he needs to use SSL via port 465, but isn't actually doing that(as gman already correctly pointed out). All dogma is stupid.
In Section
Seekers of Perl Wisdom
|
|