Smtp zf2 - stream_socket_client() - Debian Wheezy

Asked

Viewed 62 times

0

Good morning people.

I’ve been having a problem for a few days and I’ve tried everything.
I’m using Zend 2 and trying to send an email through an account I have in gmail. It should be something extremely simple, but the email is not sent at all. Since Zend suppresses the error using @, to view it I had to edit the library by removing it then the error shown is as follows:

Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known

So there I went to make that function work. I researched a lot and found several things that said solve the problem all without success.

I also tried to check something in php.ini and it still doesn’t work. I’ve tried every hint of this link and none of them worked. I mean, I have no idea how to solve this problem.

Another detail is that I ran the same project on another machine with the same OS as mine and it works normally. Debian Wheezy Usage

/Oh! And now? Who can defend me? rsrs

Thanks in advance, thank you very much. =)

1 answer

0


The problem was because instead of using the address smtp.gmail.com I was using smtp.google.com. Simple lack of attention.

But thanks a lot to those who wasted a little time reading my question rsrs

Browser other questions tagged

You are not signed in. Login or sign up in order to post.