Thursday, January 7, 2010

Sending email from PHP


This explains how to send emails from, tested for WampServer Version 2.0 on Windows XP:

1. Create email.php file
2. Add following code in emai.php file and run in browser

example@example.comspan style="font-family:arial;font-size:85%;">;
$subject = "PHP Email Script Example!";
$body = "Hellow,\n\nHow are you?\nTesting PHP email script - Okey !";

if (mail($to, $subject, $body))
{ echo(" Message successfully sent! "); }

else { echo(" Message delivery failed...");
}

?>

0 comments: