<?php
$to = "aaa@bbb.com";
$subject = "email sent with php";
$body = "sending email from server using php script.";
$headers = "From: xxx@yyy.com\n";
# error checking
if(mail($to,$subject,$body,$headers)){
echo "email was sent to $to with the subject: $subject";
}
else{
echo "there was a problem sending the email";
}
?>
No comments:
Post a Comment