note 92662 added to function.mail

From: Date: Mon, 03 Aug 2009 06:31:22 +0000
Subject: note 92662 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-159022@lists.php.net to get a copy of this message
I was trying to create a script that would send large forms without having to get/post each value first and came up with this... should help someone to save valuable time. <?php $emailSentTo = ""; $subjectOfEmail = ""; //========= no need to edit bellow // Set HTML Mail Header $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // The Message $message = $GLOBALS["HTTP_SERVER_VARS"]["REQUEST_URI"]; //Cleaning Message $message = str_replace('?','<br><hr>',str_replace('/','File used for submittimg this form: ',str_replace('=',': ',str_replace('&','<br>',$message)))); // Sending mail($emailSentTo, $subjectOfEmail, $message, $headers); //Thanking echo "<script language=\"javascript\" type=\"text/javascript\"> alert('Thank You, We will contact you shortly.'); window.location = \"http://$_SERVER[HTTP_HOST]\"; </script> "; ?> ---- Server IP: 209.41.74.194 Probable Submitter: 68.219.173.235 ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- https://master.php.net/note/edit/92662 Del: integrated -- https://master.php.net/note/delete/92662/integrated Del: useless -- https://master.php.net/note/delete/92662/useless Del: bad code -- https://master.php.net/note/delete/92662/bad+code Del: spam -- https://master.php.net/note/delete/92662/spam Del: non-english -- https://master.php.net/note/delete/92662/non-english Del: in docs -- https://master.php.net/note/delete/92662/in+docs Del: other reasons-- https://master.php.net/note/delete/92662 Reject -- https://master.php.net/note/reject/92662 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#159022) next »