[drupal-devel] Email filter

Mark Leicester mark.leicester at efurbishment.com
Sun Mar 13 12:32:01 UTC 2005


Hi Gerhard,

Yes, it works for comments too. I created an Email content type (in 
addition to the three default ones: Filtered HTML, PHP etc.) which uses 
only the emailfilter. I've patched the listhandler to allow you select 
the content type used when new content is created (also the roles that 
new users are given; I will post this listhandler patch shortly).

I'm using cvs 4.6 for this site. If the original email was iso-8859-1, 
then can just call drupal_convert_to_utf8($node->body, "ISO-8859-1")? 
It doesn't seem to be working for me: I get an empty string back. I'll 
double check.

Cheers,
Mark

On 13 Mar 2005, at 12:14, Gerhard Killesreiter wrote:

>
>
> On Sun, 13 Mar 2005, Mark Leicester wrote:
>
> Hi Mark!
>
>> I've just committed an emailfilter module which interprets a node as
>
> I suppose it will work for comments as well?
>
>> a plain text email. Depending on its configuration, it will attempt
>> to indent and colorise threaded conversations, convert URLs into
>> anchors and remove any extra linebreaks. It will also convert &, <,
>>> etc. into HTML entities.
>
> I know some Civicspace people who will thank you for this...
>
>> You can see an example of its use here:
>> http://www.planetcocoon.com/
>>
>> I'm using Drupal to collect email traffic to the Apache Cocoon mailing
>> lists in an attempt to render it more attractively.
>>
>> On another related topic, does anyone know how to tweak the 
>> mailhandler
>> and listhandler to deal with the non-ASCII characters (such as ø, 
>> etc.)
>> that come through in the usernames, subject lines and message bodies?
>> At the moment these characters are all converted to ?. I've tried some
>> experiments with drupal_convert_to_utf8() but I've had no luck so far.
>
> I've recently exposed the utf conversion part of the xml import to the
> outside world. drupal_convert_to_utf8 should be able to do the job
> (available only in cvs/4.6rc).
>
> You'll need to find out what the original encoding was, though. I'd
> appreciate a patch for listhandler, if you find the time.
>
>> As this is my first committed module, I'd appreciate some review; any
>> feedback that people may have to offer would be gratefully received.
>
> I'll have a look.
>
> Cheers,
> 	Gerhard
>




More information about the drupal-devel mailing list