mirror of
https://github.com/silicoflare/silicoflare-website.git
synced 2026-05-26 12:09:53 +05:30
Create email.php
This commit is contained in:
27
email.php
Normal file
27
email.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Sending HTML email using PHP</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$to = "silicoflare@gmail.com";
|
||||
$subject = "This is subject";
|
||||
|
||||
$message = "<b>This is HTML message.</b>";
|
||||
$message .= "<h1>This is headline.</h1>";
|
||||
|
||||
$header = "From:abc@somedomain.com \r\n";
|
||||
$header .= "Cc:afgh@somedomain.com \r\n";
|
||||
$header .= "MIME-Version: 1.0\r\n";
|
||||
$header .= "Content-type: text/html\r\n";
|
||||
|
||||
$retval = mail ($to,$subject,$message,$header);
|
||||
|
||||
if( $retval == true ) {
|
||||
echo "Message sent successfully...";
|
||||
}else {
|
||||
echo "Message could not be sent...";
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user