Hi there, thanks for looking at our project!
We currently have a simple script on our site called contact.php, which handles input from a form and sends an HTML email to an address specified as a hidden field in the form.
We would like to add a new function to this script. This is what we would like:
- At the top of the script, there should be a config area, where a set of email addresses will be located. Each email address should have an array that contains a SECONDARY email address. Once you have created a working example, the correct data for this section will, of course, be set up by me, the admin.
IF the script is run from the form, AND the email address specified is NOT one of the addresses in the config list, then the script should function normally, as it does now.
However, if the script is run from the form, AND the email address IS one of the ones in the config list, then the script should send the email as normal, BUT it should ALSO send a SECOND email.
The second email should be generated by using data that is passed through from these and additional hidden fields in the form. This second email should be sent to the SECONDARY email address, corresponding to the primary email address in the config part of the file.
The script should propagate this data into an email, as follows:
<code>
<adf>
<prospect>
<requestdate>2000-03-30T15:30:20-08:00</requestdate>
<vehicle>
<year>1999</year>
<make>Chevrolet</make>
<model>Blazer</model>
</vehicle>
<customer>
<contact>
<namepart=”full”>John Doe</name>
<phone>393-999-3922</phone>
<email>[customeremail]</email>
<comment>Keyless entry essential</comment>
</contact>
</customer>
<vendor>
<vendorname>Dealer A</vendorname>