Adsense
Popular Posts
- MySQL workbench -"Could not decrypt password cache"
- peer review (3)
- PHP, dump varailbes in a format way
- "Unusual traffic from your computer network" from blogger
- Install APXS in Redhat Linux
- JavaScript, remove trailing insignificant zeros after toFixed function
- Update member directory
- Set Windows path command line
- JavaScript: add days to current date
- DataTable table order by numeric, not by text
Thursday, June 12, 2014
Test PHP mail function
testmail.php to test PHP mail function:
<?php
ini_set('error_reporting', E_ALL);
?>
<html>
<head>
<title>PHP: Test mail function</title>
</head>
<body>
<?php
$email = "jiansen@example.com";
$subject = "Happy Birthday!";
$msg = "Wishing you all the best in life.";
echo $subject;
$headers = "From: jiansen@example.com";
$headers .= "Reply-To: jiansen@example.com";
if(mail($email,$subject,$msg, $headers)){
echo "E-Mail Sent";
} else {
echo "There was a problem";
}
?>
</body>
</html>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment