I have created a web form to allow parents and other visitors to the site to send a message to the secretary. At the moment all is working fine except one thing.
I have set up a box for email address which should then be provided as the return address. But this is not the case. Since the php mail function is running on the webserver and the server is also the smtp sender then the reply address is set as the servers address.
how can i set the reply address to the senders address that they put in the box.
I have sent the form using the post method into a .php page which then sends the info and echo a success message or failure message to screen.
The email field has the label of contact_email and the name is Email.
I have a variable set on the php side $email = $-REQUEST['email']; which is used in the send command. I have tried to use the same variable in the headers reply to section but this does not work.
what can i do to try and resolve this problem?
I use the following code for my contact form. When I receive an email the from address is the email address that the person specified when completing the form. I am not a PHP developer so I can't help you much but you might be able to work it out from my code.