I have been using PERL with Net::SMTP and Net::SMTP::TLS to send outbound smtp via Gmail for months and now it stopped working. There is now a problem with the "quit" method. Net::SMTP::TLS expects a 221 to be returned by Gmail after the quit but it is not seeing it. I found a couple references to this issue. One thread was started in 2005, one in 2007 and by coincidence one entry was added today. The only solution I have seen is to modify the PERL module quit subroutine Net::SMTP::TLS. I don't want to do that. I found that the errors could be avoided by not sending a "quit". That is not very elegant. I am changing to my ISP outbound smtp for now and keep and eye on the forums for a better solution.
The error is:
An error occurred disconnecting from the mail server:
Reference:
LinuxQuestions.org
Google Groups
Very ironic that I too [about 3AM this morning] was trying to get this to work and had the very same error using the NET::SMTP::TLS module. Not exactly a fix, but if you use the NET::SMTP::SSL module you actual gain a lot of the error checking/same API as in the NET::SMTP function but with ability to use SSL / port 465 with Gmail. This also does not result in that error.
ReplyDeleteNow the problem I am running into is that Gmail rewrites the header information for any outgoing message sent through smtp.gmail.com.. while for most casual users this isnt an issue, I am trying to implement it off a web-form on my site and thus need the header FROM address to appear differently. I am still waiting for a solution to this but I guess from a security standpoint it would make sense to NOT allow it.