So here's my issue...I have two sites hosted on one machine using apache's virtual hosts. I want to send emails from the two different sites (domain.com and domain2.com) using the appropriate email addresses. I currently have this value in php.ini:
sendmail_path = /usr/sbin/sendmail -t -i -email@example.com
But when I try sending an email from a script on domain2.com it obviously is delivered with a
From: firstname.lastname@example.org header. Apache doesn't allow you to set a rule like this from within the
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -email@example.com"
So what's the best way to accomplish this? I've tried setting
php_admin_value mail.force_extra_parameters "-firstname.lastname@example.org" from within the domain2.com's
<VirtualHost> directive but all emails are still coming from domain.com. Any ideas?