$from = "[email protected]"; $to = "[email protected]"; $sub = "This is my subject."; $msg = "The simplest way to send an email with PHP is to send a text email.";
$headers = 'From: '.$from."\r\n".
'Reply-To: '.$from."\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $sub, $msg, $headers);
if(mail){
echo "Email Sent to ".$to; } else { Echo "Error"; }