Harry Putnam <[email protected]> writes:

> I wondered if someone here happens to know or can explain how to fold
> lines in an email header such that email tools won't scream or unfold
> them.  I know folded lines make it thru my sendmail MTA and `gnus' 
> (that is the news/mail reader packaged with emacs)
> mail/news reader.  But not sure about the format involved.

I may have hit on something just by experimentation.

In the tool I've written the subject field is created from an array.

The elements are fairly short  not more than 10-30 char in general.

I found if I put them in the array, starting with the second element,
with something like 14 leading spaces, and end the line with a
semi-colon then newline, then the folded subject line the array
creates survives mailing across the internet.

Pushing like this (after the first push):
 
   push subj_ar, "                 $_;\n";

Ends up:


[...]
From: [email protected]
Subject: blabla alklka alk;
             kkvnak eia mnalvawliw aqwopia;
             blab blab abla loabae;           
             kkvn akeiamn alv awliw aq w opia;
             blab blab ablaloa bae;           
Date: Sat, 17 Apr 2010 20:55:04 -0500
[...]

I wondered if I just got lucky, and this is likely to lead to problems
or if I accidentally hit on part of the rules for formatting folded headers.


-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to