in reply to Re^2: Send a mail in Win32 with Gmail
in thread Send a mail in Win32 with Gmail

Don't set your HELO string to smtp.gmail.com. That will eventually (quickly?) get you put on a blacklist, which is annoying to get off. A HELO string is meant to be your hostname, not the hostname of the mail server you are connecting to. The mail server already knows what its hostname is ;)

And with your new, edited code, make sure you specify the HELO string. Net::SMTP uses 'localhost.localdomain' as the default HELO string, which will also get you blacklisted.

However, I'm not 100% sure if identifying yourself with SASL auth will protect you from being blacklisted, but it's better to be safe than sorry ;)