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 -fuser@domain.com
But when I try sending an email from a script on domain2.com it obviously is delivered with a From: user@domain.com
header. Apache doesn't allow you to set a rule like this from within the <VirtualHost>
directive:
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fuser@domain2.com"
So what's the best way to accomplish this? I've tried setting php_admin_value mail.force_extra_parameters "-fuser@domain2.com"
from within the domain2.com's <VirtualHost>
directive but all emails are still coming from domain.com. Any ideas?