note 37734 deleted from function.mail by sniper

From: Date: Tue, 30 Dec 2003 15:15:04 +0000
Subject: note 37734 deleted from function.mail by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62683@lists.php.net to get a copy of this message
Note Submitter: mchargue@usc.edu ---- Seems kind of odd there is no mention of the requirements of the e-mail address in the To: field. Here are some results of incorrect uses of the mail() function. mail("bad_addr",$subj,$body); //a warning gets thrown : Warning: Bad Message destination . mail("@bad_addr",$subj,$body); //a warning gets thrown : Warning: Server Error mail("bad_addr@",$subj,$body); //no warning mail("bad_addr@bad",$subj,$body); //no warning To prevent warnings from appearing (without playing with error_reporting) try to validate your form data with one of the zillion "solutions" that appears under the user notes for the ereg functions such as http://us2.php.net/manual/en/function.ereg.php#34133 (these observations from PHP 4.0.5, IIS 5.0)

« previous php.notes (#62683) next »