So I bought a theme that has a simple PHP contact form that allows users to message each other, but when a sender fills out the form and submits it, the email comes from my default Wordpress Admin email and not the email address the user inputs in the form. So if the receiver tries to reply to their email, it's going to come to me (Admin) and not the person who sent the email.
Am I missing something here...seems pretty straight forward. I've tried changing it up and using $headers, etc., but nothing works... always just comes from my admin email.
Here is the form code:
<form method="post"><input type="hidden" value="<?php the_ID(); ?>" name="pid_rep" />
<li>
<h3><?php echo __('Your Email'); ?>:</h3>
<p><input type="text" size="50" class="do_input" name="email" /></p>
</li>
<li>
<h3><?php echo __('Message'); ?>:</h3>
<p><textarea rows="4" cols="40" class="do_input" name="message"></textarea>
<<input type="submit" name="contact" value="<?php _e('Send Message'); ?>" /></p>
</li>
</form>
Here is the handler:
$email = $_POST['email'];
$message = nl2br($_POST['message']);
Reply-Toheader. Your contact form handler may already be doing this. - r3mainer