Reputation: 196
I'm using MAC OS and using mail() to send the student details to my mail.
It does not shows any errors, but the details are not sent to mail.
Is there any setup in php.ini for SMTP settings?
Upvotes: 9
Views: 36744
Reputation: 11829
sudo nano -w /etc/hostconfig
MAILSERVER=-YES-
sudo cp /etc/postfix/main.cf /etc/postfix/main.cf.org
sudo nano -w /etc/postfix/main.cf
myhostname=my.known.host
# php.ini
sendmail_path = "sendmail -t -i"
Source: http://theandystratton.com/2009/fix-phps-mail-function-after-latest-os-x-leopard-update
Upvotes: 3
Reputation: 12188
You can also use the OS X Server app from the App Store. I believe it's free, at least for developers. If you turn on the Mail option, it sets up postfix for you. You'll need a relay or you'll need your computer to have an established domain; sending e-mail is easy, but not having it rejected is hard :D
Upvotes: 0
Reputation: 4792
For OSX Yosemite, this fixed me right up:
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
SMTP=localhost
smtp_port=25
sendmail_path = "env -i /usr/sbin/sendmail -t -i"
Ensure that you have your postfix
configured - check out this link to learn more: http://benjaminrojas.net/configuring-postfix-to-send-mail-from-mac-os-x-mountain-lion/
Upvotes: 11