RE: [PHP] Re: REGEXP
| From: | Don Read | Date: | Mon, 16 Jul 2001 14:48:29 +0000 |
| Subject: | RE: [PHP] Re: REGEXP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-58055@lists.php.net to get a copy of this message | ||
On 16-Jul-01 Adrian D'Costa wrote:
> Hi James,
>
> Thanks for your mail. But I think the problem like somewhere else.
>
> I have the following:
> echo $buffer;
> There result :
> Content-Type: multipart/mixed;
>
> This is wrong. It should be
> Content-Type: multipart/mixed;
> boundary="------------B42DA66C4EC07C9B572A58FC"
>
> I don't know why it is not reading the whole string. It seems to treat
> the *boundary* part as another line.
It _is_ another line; it just happens to starts with whitespace.
check RFC822.
If you have the whole message in a string (psuedo-code):
list ($h,$msg) =split("\n\n", $mailmsg);
$h=str_replace("\t", " ", $h); // <tab> -> <space>
$h=str_replace("\n ", " ", $h); // <nl><space> -> <space>
// i.e. continuation of prior line
$hdrs=split("\n", $h);
...
Regards,
--
Don Read dread@texas.net
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.