Adsense
Popular Posts
- Code update from PHP 7.4 to PHP 8.1 - PhpSpreadsheet
- MySQL workbench -"Could not decrypt password cache"
- Code update from PHP 7.4 to PHP 8.1 - Worksheet/Iterator.php
- Rendering HTML tags inside textarea
- axios handle blob type data
- Unix Utils and wget in Windows
- increase mysql query speed
- Setup vi syntax for PHP
- EXCEL return to the next line in the same cell
- Get WAMP running on EC2
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