Wednesday, January 7, 2009

Send email using the PHP mail() function


Description

How to send an email from within a PHP page using the built in mail() function.

The code


// Your email address 
$email "you@example.com"

// The subject 
$subject "Enter your subject here"

// The message 
$message "Enter your message here"

mail($email$subject$message"From: $email"); 

echo 
"The email has been sent."

?> 

No comments:

Post a Comment