Simple php email script
September 8th, 2006 Posted in PHPThis is a simple email script which once uploaded, will send an email everytime the page is requested. It may be a good idea to add some security to this by restricting the destination email to stop spam
PHP:
-
$subject = ''
-
$destemail = ''
-
$fromemail = ''
-
$emailtext = ''
-
-
$headers = "From: ".$fromemail." \n";
-
$headers .= "Reply-To: ".$destemail."\n";
-
$headers .= "MIME-version: 1.0\n";
-
$headers .= "Content-type: multipart/alternative; boundary=\"Message-Boundary\"\n\n";
-
$headers .= "This is a multi-part message in MIME format.\n\n";
-
$headers .= "--Message-Boundary\n";
-
$headers.="Content-Type: text/plain; charset=iso-8859-1\n";
-
$headers.="Content-Transfer-Encoding: 8bit\n\n";
-
$headers.= $emailtext ."\n\n";
-
$headers.="--Message-Boundary--";