PDA

View Full Version : Sending Email


admin
12-31-2004, 01:31 PM
This is a very basic guide for sending email with PHP.


<?php
$name = "Joe Coder";
$email = "joecoder@somewhere.net";

$msg .= "Hello!,\n";
$msg .= "My name is $name and I'm sending an email test\n";
$msg .= "Let me know if you receive it!\n";
$msg .= "Thanks!";

$mailheaders = "From: somebody@somewhere.com\n";
$mailheaders .= "Reply-To: $email\n\n";
mail($email, "Just testing PHP email!", $msg, $mailheaders);
?>