Re: [PHP] Headers in body - what am I doing wrong???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 22:48 11-06-2003, you wrote:
You are already pretty far in determining the problem. Indeed the border between the header and content of a mail is an empty line.


What if i just give a hint?
Look closely:
  $from = "\"$name\" <$address>\r\n";
  $headers .= "From: ".$from."\r\n";

See ?

Yup ... too many header fields, and just one that ain't ... so hadn't noticed it ...


PS some mailservers do not like \r\n, check the manual on mail() and see what they suggest, i think it was just \n.

I actually wrote this according to the manual, ... this is an extract of the offline version of the PHP 4.2.3 I've got:


"Multiple extra headers are separated with a carriage return and newline.

Note: You must use \r\n to seperate headers, although some Unix mail transfer agents may work with just a single newline (\n). "


Sounds like you're reversed there ;-)


Mercury only cares about whether or not it's conformant to RFC822 and the siblings. Anything non-compliant is simply ignored or discarded ... but my webhost use sendmail on Linux, and since I've got another mailscript that uses the same basic format, and it works exactly as intended, then I don't think it's a problem with the \r\n header seperators...

Thanks to y'all ... now I just gotta figure out why Mercury doesn't process the commands. ... commands sent by regular mail are processed ... so it must be a problem with the script...

Rene

--
Rene Brehmer
aka Metalbunny

http://metalbunny.net/
References, tools, and other useful stuff...


-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux