Skip to Content.
Sympa Menu

en - Re: [sympa-users] Text digests with new digest template?

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Chris Hastie <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-users] Text digests with new digest template?
  • Date: Fri, 6 Feb 2004 13:38:37 +0000

On Thu, 5 Feb 2004, Adam Bernstein <address@concealed> wrote
My guess (and it is a guess - I haven't studied the code at all) is that
this would be a lot trickier than it sounds. If your list gets four
messages using four different character sets, one using
content-transfer-encoding of 7bit, one of 8bit, one of quoted-printable
and one of base64, which character set and CTE would your plain text
digest use? And what if some of the list messages include attachments or
are of the dreaded multipart/alternative content-type?

I've thought about HTML in messages and attachments, and I was going
to get to those once I worked this out: they should just be stripped
out, leaving text only, which I don't think is too hard.

How are you planning on doing this? Ideally it should be done in the code within List.pm itself - is this what you have in mind? Or are you going to pipe the message through some sort of filter afterwards?

Character
encoding I hadn't thought about, but let's just say I don't care
that much -- I'm willing to make some assumptions and ignore some
potential problems.

Well it turns out even the multipart/digest digests from Sympa have some problems in this respect - more on that elsewhere...

I mean, Topica, Yahoo, Mailman, and just about every other listserver
somehow manages to do text digests (with varying success, I grant),
and it's absurd that Sympa can't. As far as I know at the moment, AOL
and Hotmail (and maybe Yahoo?) users are all unable to read Sympa MIME
digests, or at least to read them comfortably. Any rough solution is
better than that.

Do these systems deal more comfortably with, say, a multipart/mixed message consisting of a text/plain TOC and a load of message/rfc822 parts, loosing the multipart/digest layer altogether? If so, that would be trivial to achieve with a few adjustments to the digest template.

So, any help for this ARRAY 0xXXXXX problem when including [body]?

[m->body] is a reference to the result of the body method of Mail::Internet. This apparently

"Returns the body of the message. This is a reference to an array. Each entry in the array represents a single line in the message."

So did you try:

[FOREACH m IN msg_list]

[FOREACH l IN m->body]
[l]
[END]

[END]

It's an untested guess - hope it helps.

You probably want to be digging into sub send_msg_digest in List.pm and manipulating the Mail::Internet objects with MIME::Parser etc to dump your unwanted body parts and provide you with a string for the message bodies.
--
Chris Hastie



Archive powered by MHonArc 2.6.19+.

Top of Page