How to send mail with php (simple function)
<?php
$topic = “Hello, my friend” ;
$message = “My very important email” ;
$mailto = “ info@phpinform.com ” ;
$report = mail($mailto, $topic, $message,
“Return-path: from@phpinform.com ;\n”.
“From: from@phpinform.com ;\n”.
“Reply-To: from@phpinform.com ;\n”.
“Content-Type: text/plain; charset=utf-8\n”.
“Date: “.date(”r”).”\n”.
“X-Mailer: PHP/”.phpversion().”\n”.
“Content-Transfer-Encoding: 16bit\n”);
echo “Mail sent to: “, $mailto, “ – ok”;
?> |