I’ve run into problems with my web app refusing to send out emails. It was working fine until a couple of days ago. Until then, the emails would send, but the ‘from’ address was wrong – it was coming out as ‘apache@mysite.com’, although I was using the headers to set it to ‘noreply@mysite.com’.
The sysadmin went in, and changed the default from address to ‘noreply@mysite.com’, to see if that helped. I think the problem may have been since then, but we’ve only noticed it in the last few hours (not that many emails get sent).
Currently, emails are not sending at all. The sysadmin is on holiday, so I’m trying to sort it out!
The error log says this:
sh: -c: line 0: syntax error near unexpected token 'newline'
sh: -c: line 0: '/usr/sbin/sendmail -t -i -f Do Not Reply <noreply@mysite.com>'
and it’s repeated lots of times.
The
sendmail_path = /usr/sbin/sendmail -t -i -f Do Not Reply <noreply@mysite.com>
is in php.ini – I guess this is the line the sys admin changed, but I’m not sure.
Where should I start looking for the error?
The -f option is for the return path, not the from. In any case, I’m not sure it can take a name plus an address, so you might need this instead:
Or at the least, quotes: