Jump to content

PHP auto email response


kathleencook88

Recommended Posts

Hello,

 

Basically I would like to have an auto email response after someone fills out my HTML form so that I can provide them with a special link to their given email address.

 

I have managed to get the data they enter in my form sent to my email address, I just can’t figure out for the life of me how to send an automatic email message to their email address.

 

Below is the PHP script I’m using with my form. If someone could please provide me with the rest of the script I need so that an automatic email message can be sent, it would be greatly appreciated!

 

Please note I’m very new to PHP 

 

<?php

$name = $_POST['name'];

$email = $_POST['email'];

$phone = $_POST['phone'];

$postcode = $_POST['postcode'];

 

$message = "Name: $name \n";

$message .= "Phone: $phone \n";

$message .= "Postcode: $postcode \n";

 

mail('[email protected]', 'Feedback From Results', $message, 'From: ' . $email);

header( "Location: http://something.html" );

?>

 

Link to comment
https://forums.phpfreaks.com/topic/228757-php-auto-email-response/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.