Okay, so this has been fixed in Debian's 1.10.1-3, but to work around it you can actually create a /bin/mail replacement that invokes "sendmail -t". I haven't run into the problem that Jozsef indicates -- but I can imagine it will break if www-user can't invoke the command for whatever reason.
The reason you should use sendmail -t instead of mailx is that the mail is sent with the headers as part of the main message body (i.e. it doesn't provide subject and recipient as commandline arguments).
Okay, so this has been fixed in Debian's 1.10.1-3, but to work around it you can actually create a /bin/mail replacement that invokes "sendmail -t". I haven't run into the problem that Jozsef indicates -- but I can imagine it will break if www-user can't invoke the command for whatever reason.
The reason you should use sendmail -t instead of mailx is that the mail is sent with the headers as part of the main message body (i.e. it doesn't provide subject and recipient as commandline arguments).