With a contact form, a customer usually fills in their information and email etc., and when they click Send, an email is sent to you.
However, I need a form where it sends the email to the email that is populated in the “Email” field.
I have to send tracking information daily to customers and would like to do it from this form instead of an email client.
<div id="form">
<div id="name">
<p id="username"> Name: </p>
<input type="text" name="name" class="textfield">
</div>
<div id="name">
<p id="username"> Email: </p>
<input type="text" name="name" class="textfield">
</div>
<div id="name">
<p id="username"> Message: </p>
<input type="text" name="message" class="textarea">
</div>
<input type="button" value="SEND" id="btn">
</div>
I do not know how to do the final part where the SEND function fires the correct way. If anyone can help with that please.
I would solve this with the use of Swiftmailer. The form would look like the followning:
Then the ‘send.php’ would look like:
Swiftmailer you can download from here: http://swiftmailer.org/download (just unzip to the same path as send.php)
Documentation of Swiftmailer is here: http://swiftmailer.org/docs/introduction.html
Hope it helps!