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:
Sysadmin on the everlasting journey of learning. Always in search for an opportunity to prove myself and to learn something new. My addiction is learning and my main goal is to excel in every aspect of Linux/Unix system administration.


Leave a Reply

Your email address will not be published. Required fields are marked *