I have a php script under a wordpress
theme sending emails using the mail()
function.
I have postfix
, dovecot
& sendmail
installed on the server.
For a long time the script functioned properly without any issues.
Recently mails are not being sent from that script and after a long wide search the only lead I could find as to this error is this mail.log
error I am getting from the php mail()
execution:
postfix/sendmail[7588]: fatal: Recipient addresses must be specified on the command line or via the -t option
Couldn't find any info as how to deal with it....
Can anyone help??
Add a comment
|
1 Answer
Took me a few days but here's the solution:
It's in the mail section of /etc/php5/apache2/php.ini
These configurations need to look like this:
[mail function]
SMTP = localhost
smtp_port = 25
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = /usr/sbin/sendmail -t