markhunnibell has asked for the wisdom of the Perl Monks concerning the following question:

This is a question with its own answer that I sorted through and the path was rough enough I thought I'd drop a note here so others might not have to go through it themselves. GoDaddy offers their customers the ability to use their SMTP servers to send mail. Obviously they want to authenticate the senders and also limit the quantity, and they do that, but it's a useful service especially for those who travel and need to be able to send mail from any network. Anyway... I had a small utility program that used Net::SMTP to send mail via this GoDaddy service (uses smtpout.secureserver.net on port 80 or 3535 to send mail) and it was working just great until about a month ago. About a month ago, the emails would appear to be swallowed by smtpout.secureserver.net). GoDaddy tech support was no help, so I put the DEBUG mode on in Net::SMTP and saw the following "fatal" information:
Net::SMTP=GLOB(0x180f4a0)>>> RCPT TO:<joesmith@foo.com> Net::SMTP=GLOB(0x180f4a0)<<< 553 Sorry, that domain isn't in my list o +f allowed rcpthosts. Net::SMTP=GLOB(0x180f4a0)>>> DATA Net::SMTP=GLOB(0x180f4a0)<<< 503 You must send RCPT TO: first
All the DEBUG information prior to that looked OK to my untrained eye, including the authentication, but the above feedback seemed to be why my messages were being black holed. I figured it was some misconfiguration of the mail server at GoDaddy. But I continued to research and found the Net::SMTP_auth module. Getting this installed turned into a small fiasco because it supports a bunch of encryption standards involving module dependencies I did not have, but I finally got it fired up and working and then I tested it out with the GoDaddy service. What I found is this:
  1. The GoDaddy service currently uses PLAIN authentication.
  2. The initiation code that works for sending the mail is:
    use Net::SMTP_auth; $smtp = "smtpout.secureserver.net:3535"; $username = 'joesmith@foo.com'; $password = 'gsx5f3d3'; $smtp = Net::SMTP_auth->new("$smtp"); $smtp->auth('PLAIN', $username, $password);
  3. Although Net::SMTP has an "auth" function that USED to work with GoDaddy's service, it does not work any more. The Net::SMTP "auth" function that used to work but doesn't is: $smtp->auth($username, $password);
Anyway, I thought it would be useful to post the question and method of resolution so that others who may be scratching their heads about this or related issue will have a place to start.

Replies are listed 'Best First'.
Re: Using Net::SMTP with GoDaddy's Relay Server
by Corion (Patriarch) on Jul 18, 2007 at 11:08 UTC

    I found swaks a very good tool for debugging SMTP in its various incarnations (ESMTP, SMTP-auth, SMTP-with-TLS). As a bonus, it's even written in Perl! I use it in some tests against my vmail setup to verify that mail gets accepted and rejected as I expect it.