Voting starts in March for the Drupal Association Board election.
New to Drupal, hope I am posting in the right place.
I am using the webform module to create a form, and I want to send a reply email after submission to the user's email they entered on said form. In the "webform advanced settings" section of the webform configuration setup screen there is a place for "Additional processing" which is where I am putting the code to send the email. When I hard-code an email address ($email = "xyz@mySite.com") it works fine, but doesn't work when I try to access the address entered by the user on the form. Here's the snippet:
// User's email address $email = $form_values['email']; // The subject $subject = "Thank you for submitting"; // The message $message = "Hello and thanks for the love!"; mail($email, $subject, $message, "From: me@mySite.com");
$form_values['email'] doesn't seem to have a value. I don't know if my syntax is wrong, or if I'm just going about this in the wrong way, but any advice is greatly appreciated. Thanks.