I use mailhandler to let family post content to my site from abroad, so in preparation for D-6 I need mailhandler. From an earlier post on this project there was a comment that hardly anyone works on mailhandler these days, so I have taken the liberty of making a start on migrating it (I've migrated a couple of my own modules recently, so was getting familiar with where changes are needed).

I've actually completed the bulk of the update, but at the same time I've taken the liberty of adjusting some of the code to make slightly more use of the form API to handle various pages, which eliminates a couple of functions.

The bulk of mailhandler's code is to do with admin and page retrieval, so I have hived these off in to separate includes, leaving the main module fairly slm.

However, I use mailhandler with my mailsave project to collect emails, and my family have a habit of sending many emails in one go, often with large attachments. This was giving me a time out error on cron.

I am therefore currently doing a couple of experiments such that (a) a manual download is created as a batch, using the new batch API, and (b) making cron retrievals fetch just a few messages at a time.

In respect of (a) I have working code, and it looks ok so far - a nice progress bar, and successful retrieval of 34 emails in one go with no timeout! In respect of (b) it is still work in progress, but seems to be coming together.

I'm hoping to get a bit further over the next week or so, and can then post something back for onward development.

Hope this helps! And hope whoever is the project maintainer doesn't mind :-)

Cheers

Stuart

CommentFileSizeAuthor
#1 mailhandler.tar_.gz14.34 KBStuart Greenfield

Comments

Stuart Greenfield’s picture

StatusFileSize
new14.34 KB

I've made some headway in making a port of mailhandler for D-6, attached in the file.

As per comment above, I've separated some of its functions in to separate includes. As I use mailhandler with mailsave I get caught by my family sending large attachments, so I've added a new config setting to limit the number of messages retrieved in each cron run. If retrieving manually it uses the new batch handler to prevent time-outs (retrieved 38 messages in one go!)

I also added a config option to choose the default type. Mailhandler always chose blog, which I don't use on my site, so it now selects from blog, story, page or the first type in the types list, unless the user chooses an alternative.

I've not looked at the bug list since I wanted to get MH up and running so I can start porting mailsave.

Hope this helps!

moshe weitzman’s picture

Hi Stuart. Is this patch ready for review and commit? Are you still working on it. Thanks much for your work.

Stuart Greenfield’s picture

Hi - I've not made any more changes since the patch above, so yes, it needs some review/testing etc

I've been running it on test on my local development server and it seems to be behaving properly, at least far as I can tell!

mohammed76’s picture

Status: Active » Needs review

hi.

I have tested the drupal 6 port extensively too and found it to be working just as expected. I think it's fair to consider it as a patch that needs review and testing.

@stuart, thanks for your great efforts!

philingle’s picture

I have tried this out extensively on a test site without any problems so I have now started to use it on my first live Drupal 6 site and it seems to be working fine

Thanks for your time and effort Stuart in getting this 6'd

Phil

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community
jjkd’s picture

Just put this on my 6.1 site, I only use a tiny part of the functionality of this module, but it seems to work fine for me.
--
Joe Kyle
--jjkd--

Jkello’s picture

Hi, was just wondering why this is not committed yet? Thanks!

moshe weitzman’s picture

Status: Reviewed & tested by the community » Fixed

i made a few updates and committed this. thanks all. there is a new release as well, which will show up soon on drupal.org.

motivated by jose's excellent blog post at http://www.developmentseed.org/blog/2008/apr/30/reply-above-line-post-co...

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.