I built an intranet app that needs to send email (low volume). I will not be able to use the SMTP server of my organization, so I need to send these emails via sendmail or mail.
However, when I config my email as:
$config['protocol'] = 'sendmail';
I get:
Exit status code: 127
Unable to open a socket to Sendmail. Please check settings.
Unable to send email using PHP Sendmail. Your server might not be configured to send mail using this method.
and when I use:
$config['protocol'] = 'mail';
I get:
Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
Is there anything I should setup in PHP or check in phpinfo() to figure out how to get this to work?
OK - this was simple.
For anyone who faces this issue:
cd usr/sbin/
sudo apt-get install postfix
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