Linux email configuration - multiple domains
We have a webserver that hosts 2 domains.
PHP version: 5.3.3-7+squeeze14
Server version: Apache/2.2.16 (Debian)
Server built: Nov 30 2012 08:33:45
These are configured in these directories:
Everything responds correctly in the web browser, except we're having problems with sending email.
I have exim4 set up for email but I'm not sure if I have it configured correctly. Before I set up the 2nd domain (www.domain2.us), email was working fine from the original domain (www.domain1.com). After I set up domain2.us, email stopped working for domain1.com (& didn't work for domain2.us).
I tried dpkg-reconfigure exim4-config several times and eventually got domain2.us and domain1.com to be able to send email from a simple test script that looks like this:
However, when the emails come in the sender for domain1.com shows up as:
emails from domain2.us show up as:
How can I get the ones from domain2.us too show up as being from webmaster@domain2 instead of www-data@domain1?
You need to be passing your custom headers in the mail() function's 4th argument:
Alternatively, you can create/use an SMTP account for each domain to send email through so it will always be the correct domain & username.
|All times are GMT +1. The time now is 01:25 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.