Contact Form Submission emailed

the mail() function

Moderators: macek, egami, gesf

Post Reply
kc0pph
New php-forum User
New php-forum User
Posts: 86
Joined: Sat Nov 26, 2011 8:39 am
Location: Pueblo, CO
Contact:

Re: Contact Form Submission emailed

Post by kc0pph » Sun Dec 04, 2011 8:24 am

By guide completely this is the most anyone can do without writing the code for you.

Gather the POST variables from your form.
$name = $_POST['name']
$message = $_POST['message']

Prepare the Email
$to = "vijuihdsa@companyname.com"
$subject = "Someone Likes you enough to send you a message"
$message = "You have a new message from". $name "<br /><br />". $message
$headers = 'From: Facebook@example.com' . "\r\n" .
'Reply-To: noreply@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();


mail($to, $subject, $message, $headers)

If you cant get it to work with that abstract then make a charitable donation to my NFL Sunday Beer fund and ill write your code.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest