SMTP unable to connect error.

Hello,
I have developed an application that sends email. When I run the application, I am getting the following error.


stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://smtp.gmail.com:465 (Connection refused)

What is wrong with the application /environment?

Can be all kind of things, varying from wrong userid/password, portnumber etc. Are you sure you have set the right values?

I checked settings again, they are correct and works in Outlook.

Alguien pudo solucionar esto tengo exactamente el mismo problema, hace dias. :frowning:

[QUOTE=milind.wakale;20365]Hello,
I have developed an application that sends email. When I run the application, I am getting the following error.


stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://smtp.gmail.com:465 (Connection refused)

What is wrong with the application /environment?[/QUOTE]

Can you post your code?

you may want to make a small hand coded php mail program first to test if it works. Sometimes mail fails because your openssl isnt set up properly.