I am trying to wrap my hear around how I am going to get around this latest hurdle. What needs to happen:
PHP script sends email to our Exchange Server ....
Sounds simple right? Well the issue is that the LAMP server that has the PHP script on it is located in our office building, while our web server is hosted at a dedicated hosting company
IP 65.xxx.xxx.xxx. When we send the email to our exchange server (hosted by Office 365) from the office based PHP script
IP 173.xxx.xxx.xxx, the exchange server pings-back the domain that the email came from only to find that the IP the domain resolves to is our web server IP
65.xxx.xxx.xxx ... and not the office
173.xxx.xxx.xxx (which the email originated from) It compares, they don't match .. and trash goes the email.
What methods can I use to get that email sent out with the
65.xxx.xxx.xxx IP so that the exchange server doesn't block it? I was thinking possibly having PHP SSH into the web server and use it's (the web server's) sendmail? Or do I remove sendmail on the office maching and use postfix to TLS into our exchange account? I have never dealt with this. ANY help, advice, web articles -- anything that points me to a viable solution would be appreciated!