mail - /* additional headers */ $headers .= "From:

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/html; charset=UTF-8\n"; $headers .= "Return-Path: <".$_POST['mailFrom'].">\n";
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: /* 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

This note was uploaded on 08/14/2009 for the course ITP 204X taught by Professor Dent during the Spring '08 term at USC.

Ask a homework question - tutors are online