Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^2: SMTP authentication misery

by tirwhan (Abbot)
on Nov 20, 2009 at 19:09 UTC ( #808504=note: print w/replies, xml ) Need Help??

in reply to Re: SMTP authentication misery
in thread SMTP authentication misery

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\\000password")'
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:


says 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.

Replies are listed 'Best First'.
Re^3: SMTP authentication misery
by cypress (Beadle) on Nov 20, 2009 at 19:20 UTC

    Mmm. I will give MIME::Base64 a try, as well. Thanks much, tirwhan.

      No, the MIME::Base64 line won't help you much, I only posted it to show how the line in the dump output came about.

      More importantly, please read the /msg I sent you (in the chatterbox node on the right of your screen) or view the spoiler in the above node.

      All dogma is stupid.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://808504]
[Corion]: haukex: Yes - I see the benefit of using Dist::Zilla for people with 150+ modules on CPAN, but I don't see it for myself, and I'm always put off from contributing to such modules because they require a lot of toolchain setup that I don't want to ...
[Corion]: ... spend time on if I only want to provide a short patch
[haukex]: Corion: Yes exactly, in the author tests I don't worry about portability as much, I also don't list the author tests' dependencies in Makefile.PL
[haukex]: I figure someone who wants to contribute will know how to install the missing modules ;-) Not the nicest way to go but I don't think many people are using my modules yet
[ambrus]: Corion: some of these stupid syntax highlighters assume that too. just look at the table in http://perldoc. functions/pack. html for example.
[haukex]: ..."yet" ;-) I haven't had to deal with Dist::Zilla yet but I've heard about how it's a big setup

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (14)
As of 2017-02-27 12:39 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (385 votes). Check out past polls.