Ivan Tomica

Enable PHP mail() in FreeBSD

On FreeBSD 11 sendmail is not enabled by default. Also by default, php configuration (php.ini) has sendmail binary configured for sending email so using mail() within your PHP application may not work. To resolve that you need to enable sendmail which you can do with:

# sysrc sendmail_enable="YES"
sendmail_enable: NO -> YES
# sysrc sendmail_msp_queue_enable="YES"
sendmail_msp_queue_enable: NO -> YES

After that just start sendmail with:

service sendmail start
Tagged in:
About 
Sysadmin on the everlasting journey of learning.