On 2008-09-21 at 14:02 -0500, Robert Nicholson wrote:
> So is there anyway to get the entire contents of a $header_ variable
> that's split across lines?
>
> For instance
>
> Content-Type: text/plain;
> charset="us-ascii"
>
> if I print out $header_content-type I only get the second line and not
> the first
I need to see more of what you're doing, since I don't think the problem
is here (or precisely as described).
With sufficiently recent Exim, you can do -be style expansions with a
message, to supply headers, etc. The "-bem" option.
Eg, putting a short email into a file "foo" with the Content-Type:
header you described, and running "exim -bem foo", I see:
% exim -bem foo
> $header_content-type:
text/plain;
charset="us-ascii"
> ${extract {charset}{${sg{$header_content-type:}{^[^;]+;}{}}}}
us-ascii
> ${if match{$header_content-type:}{\N^([^;\s]+)[\s;]\N} {$1}fail}
text/plain
>
-Phil