Send Mail Script
$message= ” ” ;
if (empty ( $mailtoname) || empty ( $mailtomail) ) {
die ( “Recipient is blank! “) ;
}else{
$to = $mailtoname . ” ” ;
}
if ( empty ( $mailsubject) ) {
$mailsubject=” “;
}
if (($mailpriority>0) && ($mailpriority<6)) {
$mailheader = “X-Priority: “. $mailpriority .”n”;
}
$mailheader.= “From: ” . “Sales Team n”;
$mailheader.= “X-Sender: ” . “support@n”;
$mailheader.= “Return-Path: ” . “support@n”;
if (!empty($mailcc)) {
$mailheader.= “Cc: ” . $mailcc .”n”;
}
if (!empty($mailbcc)) {
$mailheader.= “Bcc: ” . $mailbcc .”n”;
}
if (empty($mailbody)) {
$mailbody=” “;
}
$result = mail ($to, $mailsubject, $mailbody, $mailheader);
echo “Mail sent to “. “$to”. “
“;
echo $mailsubject. “
“;
echo $mailbody. “
“;
echo $mailheader. “
“;
if ($result) {
echo “
Email sent successfully!
“;
}else{
echo “
Email could not be sent.
“;
}
?>
To