or download this
socket_write("AUTH PLAIN " . encode_base64(join("\0", $
+auth->{user}, $auth->{user}, $auth->{password}), $CRLF)
) || return fail("send AUTH PLAIN failed (lost connect
+ion?)");
socket_read()
|| return fail("AUTH PLAIN failed: $server_reply")
+;