PHP Mail function is not working in localhost mac

I am running in Yosemite. When I register the account, I see the new entry in the database, but I am not getting the email.

I edit this line below but still doesn’t work.

Edit your /Applications/XAMPP/etc/php.ini file

Look for ";sendmail_path"

And write the following:

sendmail_path = "env -i /usr/sbin/sendmail -t -i"

This is what I added in postfix/main.cf file

relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes
smtp_sasl_mechanism_filter = plain

Kindly help.

do you get anything in your sendmail log? what’s the response from your PHP script when you try sending an email?

Problem has solved by Postfix method.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.