mail - <".$_POST'mailFrom">\n" additional...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
<? /* recipients */ $to = $_POST['mailTo'] ; // note the comma /* subject */ $subject = $_POST['mailTitle']; /* message */ $message = $_POST['mailBody'] ; /* To send HTML mail, you can set the Content-type header. */ $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=UTF-8\n"; $headers .= "Return-Path:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: <".$_POST['mailFrom'].">\n"; /* additional headers */ $headers .= "From: ".$_POST['mailName']."<".$_POST['mailFrom'].">\n"; if(!empty($_POST['cc'])) $headers .= "cc: ".$_POST['cc']."\n"; /* and now mail it */ if(mail($to, $subject, $message, $headers)){ echo "output=sent"; } else { echo "output=error"; } ?>...
View Full Document

Ask a homework question - tutors are online