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:
- The GoDaddy service currently uses PLAIN authentication.
- 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);
- 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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.