note 19373 deleted from function.mail by aidan

From: Date: Mon, 14 Feb 2005 01:07:20 +0000
Subject: note 19373 deleted from function.mail by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-84950@lists.php.net to get a copy of this message
Note Submitter: ddns at N-oS-p-A-m dot they dot nu ---- Watch out for subject lines with a \n at the end (or presumably anywhere). mail() won't strip this off the end and any additional headers specified in the fourth parameter will get stuck at the beginning of the body. Exmaple: mail("joe@example.com", "Registration Confirmation\n", "This is to confirm your registration... blah...", "From: registration@example.com"); Sends a message to joe@example.com with a subject of "Registration Confirmation" as expected, but shows the userid of the process running the web server as the sender and has the following as a body: --------------------------------- From: registration@example.com This is to confirm your registration...blah... --------------------------------- a quick "trim($subject)" solves this.

« previous php.notes (#84950) next »