I hoping someone will be able to help me, as I'm at a loss as to what is causing the problem. Our website has a contact us form, with fields for name, email, kid name, kid ID, & message.
When the form submits, the server side php code validates the form fields, & if all is good, uses the built in php mail() function to send 2 emails.
Email 1 goes to an inbox on a hosted exchange server containing the values in the form fields.
Email 2 goes to the person submitting the form saying thanks - we'll get back to you shortly.
For email 1, the From, Reply-To, & Return-Path headers are set to the email entered in the form, & the To param in the mail() function is the email address of the inbox of the hosted exchange server.
For email 2, the From, Reply-To, & Return-Path headers are set to the email address of the inbox on the hosted exchange server, & the To param in the mail() function is the email address entered in the form.
The website's host has the MX, PTR, SPF, & TXT records set up properly to allow emails to be sent to & from the email address of the inbox of the hosted exchange server. The website's host uses QMail as the SMTP service that actually sends the emails, & in all tests, QMail is receiving a success when sending both email 1 & 2. There is no error issued by the mail() function.
Local tests were done with IE8, Chrome, & FF3.6.17. The code was not changed between tests showing this problem.
In all test cases, email 2 (back to the person submitting the form) is sent just fine. Email 1, on the other hand, is only intermittently working. The general pattern is that the 1st time the contact form is used with each distinct email address in the form, the email is sent fine, & the headers & to are correct.
The 2nd time the contact form is used with a previously used email address in the form, the To param is set to the email address in