This will take yall 2 secs…hopefully, but I just can’t figure it out.
FYI…I am a noob(google learner).
I have a Form that has a dropdown list of my fellow employees email addresses. The form will allow the user to select their email address, fill out the rest of the request and submit it.
I am using PHP to send emails(PHP Mail()) of requests I made from HTML with a Reply-to and From: header using the email address they selected in the drop down list.
But it is not giving me a from or reply to when I receive the email.
This is the (HTML and PHP) code I have so far. Don’t judge me, just help…lol ;).
[php]
<?php $email = $_POST['email']; $to = '[email protected]'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: ' .$email . "\r\n" . 'Reply-To: ' .$email . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); echo "Thank You, Your request has been sent." ?>[/php]
<form method="post" action="agent.php">
<div id="email">
<select>
<option value="Default">-- Your Email Address --</option>
<option name="email" id="email" value="[email protected]">Email_in_dropdown_List </option>
</select>
</div>