Skip to content

Instantly share code, notes, and snippets.

@anir0y
Created February 20, 2019 06:30
Show Gist options
  • Save anir0y/0c30ca8897a984b49b5dcbf650cfb237 to your computer and use it in GitHub Desktop.
Save anir0y/0c30ca8897a984b49b5dcbf650cfb237 to your computer and use it in GitHub Desktop.
Simple Send mail script
<!DOCTYPE html>
<html lang="en">
<head>
<title>MAIL TEST SCRIPT</title>
</head>
<body>
<?php
ini_set('display_errors', 1);
error_reporting( E_ALL);
$from= "from@abc.com";
$to = "ani@roy.com";
$sub = "test mail ";
$msg = "whatever";
$head = "From:".$from;
if(mail($to,$sub,$msg,$head))
{
echo "yeah it's working just fine! both of emails ";
echo '<br>';
echo '<br>';
echo $to. ' send successfully to this address' ;
echo '<br>';
echo '<br>';
echo $from. 'using this address';
}
else{
echo "code it again";
}
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment