I've been having some issues with this, in common with other contributors to this excellent Forum.
Tried a number of solutions and suggestions in those threads and finally came across your reference to
This was really helpful and finally resolved my problems with Gmail.
I had originally looked at the Google article Configuring other mail clients
which helped me locate the required port number, or so I thought. I was under the impression that it was necessary to use the SSL port, #465, but although this did not raise any compile errors the page request timed out.
Once I saw your code and used port #587, the port for TLS/STARTTLS, everything went smoothly.
Just to help clarify my own thought processes, why did the SSL port fail and the TLS/STARTTLS port succeed? If I hadn't read your document I don't think I would have tried that option, because it didn't, at least superficially, match the requirement for SSL.
(As a matter of interest, I found some SMTP port settings for Gmail and Hotmail on http://www.emailaddressmanager.com/t...-settings.html
This suggested SSL port #465 for Gmail. As noted above this did not work.
It also suggested the smtp setting for Hotmail as port #25, using smtp.live.com
This was successful, so now I can access two different providers. Can't face the thought of Yahoo, in its various incarnations just yet!)