|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-01-24 17:47 UTC] torben at cvs dot php dot net
[2003-11-16 17:31 UTC] o6y1 at hotmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 07:00:01 2025 UTC |
$SERVER_NAME, $REQUEST_URI, and $QUERY_STRING aren't being echoed out in the email body. They work fine in the from and reply-to headers, though. Here's what i get in my email: -- begin email snippet -- Date: Mon, 24 Jan 2000 14:25:08 -0800 Message-Id: <200001242225.OAA04055@unionbay.> To: joel@nextstudio.com Subject: Success From: webmaster@unionbay.nexthost.com Reply-To: webmaster@unionbay.nexthost.com X-Mailer: PHP/4.0b3 Sender: nobody@unionbay.nexthost.com Zip search database rebuilt. Num of records: 8711 Monday, January 24, 2000 02:25:08 pm HOST: , URI: REMOTE_ADDR: -- end email snippet Below is the code that I used to generate the above response. -- begin script snippet1 -- /* * bool status_mail(bool end, string subj, string message, string recpt) * * email result status */ function status_mail($bomb, $subj, $msg, $recpt="joel@nextstudio.com") { $r = mail($recpt, $subj, $msg."\n\n".date("l, F j, Y h:i:s a")."\n". "HOST: ".$SERVER_NAME.", URI: ".$REQUEST_URI.$QUERY_STRING."\n". "REMOTE_ADDR: ".$REMOTE_ADDR."\n", "From: webmaster".$SERVER_NAME."\nReply-To: webmaster".$SERVER_NAME."\nX-Mailer: PHP/". phpversion()); if ($bomb) die($subj.": ".$msg); else echo $subj.": ".$msg; return $r; } -- end script snippet1 -- It's in it's own include file which is then called as: -- start script snippet2 -- status_mail(false, "Success", "Zip search database rebuilt.\n\nNum of records: ".$i); -- end script snippet2 -- $i is an int if that makes any difference. Any ideas? Joel