mailhandler - Was: Re: [drupal-devel] Email filter

Mark Leicester mark.leicester at efurbishment.com
Sat Mar 26 17:41:57 UTC 2005


Hi Moshe,

I'd like to submit my mailhandler patches. I've rolled the emailfilter 
into mailhandler, so now mailhandler:
- provides a filter to display conversation replies
- deals with i18n characters in email subject, from address and body

Some questions/notes:
1. I've copied comment creation code into the mailhandler module 
(removing the drupal_goto which causes problems). You mentioned a fix 
was on the way. Where can I find that? Otherwise, shall I submit it as 
part of my patch.
2. I use the listhandler with the mailhandler. Because the listhandler 
creates the users on the fly, I had to move the mailhandler_switch_user 
call. It now follows the foreach (module_list() as $name). Can you 
foresee this causing any trouble?
3. I understand what you mean about using mailhandler commands to set 
the content type, but I would prefer to have the radio button content 
type selector UI available when I edit a mailbox. Are you happy for 
this to happen?

Being new to Drupal development I want to check that when you say "you 
may commit the filter stuff directly to mailhandler.module", you mean I 
may go ahead and commit my changes to CVS. I have committer rights, but 
I don't want to step on any toes by committing inappropriately! Please 
confirm.

Regards,
Mark

On 14 Mar 2005, at 01:09, Moshe Weitzman wrote:

>> Thanks for the hook_menu() pointer. Your suggestion to wind the 
>> filter into the mailhandler sounds good to me too. I'll create a 
>> patch shortly. As I mentioned earlier I've patched listhandler to 
>> allow an admin to select the content type used when new content is 
>> created from received mail. I'd like to add that to the mailhandler 
>> too: what do you think?
>>
>
> you may commit the filter stuff directly to mailhandler.module. please 
> commit to both 4.5 and HEAD if possible. each is slightly different, 
> unfortunately ... from your description it sounds like we don't need 
> that listhandler patch. it can be handled with a mailhandler command. 
> see the extended help page for mailhandler.
>
>> Cheers,
>> Mark
>>
>> On 13 Mar 2005, at 13:20, Moshe Weitzman wrote:
>>
>>> At first blush, this looks like a real useful module for mail 
>>> handling in Drupal. Nice work ... I wonder if it shouldn't go 
>>> directly into mailhandler.module? Do you see other uses beyond 
>>> prettying up inbound email? If you get the UTF8 stuff worked out, 
>>> please close this issue: http://drupal.org/node/4758. Again, I think 
>>> that fix should wind back into mailhandler.
>>>
>>> CODE
>>> - you want to switch on $may_cache in emailfilter_menu(). your call 
>>> to _head() is happenning twice right now. See docs for hook_menu().
>>>
>>>
>>> On Mar 13, 2005, at 7:05 AM, Mark Leicester wrote:
>>>
>>>> Hi all,
>>>>
>>>> I've just committed an emailfilter module which interprets a node 
>>>> as 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.
>>>>
>>>> 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.
>>>>
>>>> As this is my first committed module, I'd appreciate some review; 
>>>> any feedback that people may have to offer would be gratefully 
>>>> received.
>>>>
>>>> Regards,
>>>> Mark
>>>
>>
>




More information about the drupal-devel mailing list