Hi there!
I hope you can help me.
On my website, when a client fill a form, we will receive an email with the client’s deatils, such as Name, surname, email… but I was trying to add the time and date when the client filled the form on the email.
That’s my code below:
$headers = "From:[email protected]\n" . “MIME-Version: 1.0\n” . “Content-type: text/html; charset=UTF-8”;
$en_email = "[email protected]";
$subject = “New”;
$en_firstname = $_POST[“en_firstname”];
$en_surname = $_POST[“en_surname”];
$en_email = $_POST[“en_email”];
$en_phone = $_POST[“en_phone”];
$en_course = $_POST[“en_course”];
$en_price = $_POST[“en_price”];
$timestamp = $_POST[“timestamp”];
$message = ’
Course Details | Date: | ‘.$timestamp.’ |
Course: | ‘.$en_course.’ | |
Price: | ‘.$en_price.’ | |
Lead Details | Name: | ‘.$en_firstname.’ ‘.$en_surname.’ |
Email: | ‘.$en_email.’ | |
Phone: | ‘.$en_phone.’ | |
Address: | Adddress: | ‘.$per_add_1.’ ‘.$per_add_2.’ |
Town: | ‘.$per_town_city.’ | |
County: | ‘.$per_country.’ | |
Postcode: | ‘.$per_postcode.’ |
';
wp_mail($en_email,$subject,$message,$headers);
Thank you!