0

I have a new server. Just installed Postfix (apt-get install mailutils), and configured postfix as "Internet site". Works fine when I'm logged in as regular user on the command prompt and use "mail xx@domain.com" to send a mail. When I try sending mail via PHP, nothing happens. I tried mail("xx@domain.com", "subject", "my test");, but nothing is sent. When I look at /var/log/mail.log, nothing appears (though everything appears when sending from command line, without PHP).

When I didn't change my php.ini line

;sendmail_path =

, nothing appears in the mail.log file. When, to test, I added

sendmail_path = /usr/sbin/sendmail -i -t

I get an error in my /var/log/mail.log, saying

fatal: Recipient addresses must be specified on the command line or via the -t option

(which seemed to be specified, according to me...?)

Any idea what could be causing this? How can I get my PHP to send mail?

0

The problem is solved by re-installing (a new version of) PHP. Since no postfix was installed when compiling the first time, the mail() was disabled...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.