mail() problem
| From: | AJDIN BRANDIC | Date: | Tue, 26 Sep 2000 11:41:18 +0000 |
| Subject: | mail() problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-17591@lists.php.net to get a copy of this message | ||
Hi,
I am using mail function which sends an email to a client who then
processes the body part. The body message should be of a specific format
(one line with no blanck lines before or after it, and no white spaces
before it). My message adds one (perhaps two) blank lines at the top of
the message and I don't know why. Has anyone had a same problem before.
The code is:
$email = "me@here.ac.uk";
$mailsubject = "CALL ME";
$mailheaders = "From: us@there.com\n";
$mailheaders .= "Cc: david@aswell.co.uk\n";
$mailheaders .= "Bcc: \n";
$mailheaders .= "Reply-To: someone@blah.co.uk\n";
$mailheaders .= "X-Mailer: PHP3 Mail Function on Apache/BSD\n";
$msg="REQUEST:$somevar:$anothervar";
//Send the mail
if (mail($email,$mailsubject,$msg,$mailheaders)) {
}
else {
print("Error: The message could not be sent.\n");
}
Thanks,
Ajdin