I've implemented the yii-user module in a new php project and everything works fine. But when i register, the program should sent an activation email , but when i press the register button i get the following error:
mail() [function.mail]: Failed to connect to mailserver at >"localhost" port 25, verify your "SMTP" and "smtp_port" setting >in php.ini or use ini_set()
I've searched and i changed my ini file to:
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.gmail.com
; http://php.net/smtp-port
smtp_port = 465
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = [email protected]
But that didn't help.
How do i solve this
It seems your problem is that Gmail is not an open relay, meaning it requires authentication with an account in order to accept outgoing mail. See the Gmail page Problems sending mail. At the very least, you'll need to supply account information, and I don't see that in your example.
Check to see if your hosting services is blocking port 465
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With