Notification: Extending "My Mail" plugin (1 Viewer)

bigj

Portal Pro
January 10, 2005
245
1
Mail plugin - downloads email from pop3 server and allows reading via mediaportal. It doesn't delete the emails from the server so they remain available for a primary email client. AFAICT, it is currently possible to mark individual mail read/unread but not delete mails.

There's a couple of features I wanted to add:

1 Mark *all* read/unread

2 Remove all mails marked as read (currently each 'check for mail' appears to accumulate).

3 Configurable Filters
These will be configured via the MP configuration util. It will allow the mail list to be filtered by 1 or more 'complex searches'. A complex search is a search across multiple fields and includes logical operations. For example: (from is "Bob") or (subject contains "urgent")

4 Longer term: Have emails download in the background and get MP to popup a window with a user message for mails that match a particular filter or set of filters. e.g "You have email from Bob".

Plan:
I'm working on 3 currently. It uses a standalone ComplexMatch class that I'm writing. This could be used by others - so I'd like to put it into utils.

Then I'll do 1 and 2.

For 4. Would some of the mail/server code need to be moved to a process plugin? How is it 'serviced' - is threading supported?

Thoughts welcome. Will this conflict with any work anyone else is doing?
(This is private dev so won't affect CVS or efforts to get RC3 bug free!).

Regards,
BigJ.
 

wewe

Portal Pro
August 3, 2005
362
0
63
Herxheim
Home Country
Germany Germany
"4" is a very good idea!!!


Maybe you just go from Frodo's tutorial-process-plugin. It's straight forward and it works.


thanks+regards
WeWe
 

bigj

Portal Pro
January 10, 2005
245
1
I am considering updating the MyMail plugin to store its data in an sql database.

This will be more flexible and make it easier to add more features.

Does anyone know of any reason why I shouldn't do this?
Any good tips or known gotchas in using the sql db stuff?

Thanks
BigJ.
 

mzemina

Retired Team Member
  • Premium Supporter
  • February 23, 2005
    2,065
    14
    Tulsa, OK
    Home Country
    United States of America United States of America
    Just one question - how much data are you planning to store from each email in a db instance?

    Mike
     

    bigj

    Portal Pro
    January 10, 2005
    245
    1
    mzemina said:
    Just one question - how much data are you planning to store from each email in a db instance?

    Mike

    I have two options:

    1.
    emails = {idx, uid, server_idx, from, to, subject, date, body, other minor state }

    2.
    emails = {idx, uid, server_idx, from, to, subject, date, bodyfilename, other minor state }

    With 1 the body text gets stored in the DB, with 2 there is just a reference (uid-filename) and the body is still stored to disk separately.

    There would be other tables; off the top of my head:

    servers = {idx, servername, port, user, password, ... }
    attachments = {idx, email_idx, filename}
    filters = {idx, filter}

    Attachments would be dumped to disk as they do currently.


    I think moving to using a DB would facilitate a clearer separation of the data and any views on it. Also basic operations such as adding,deleting etc become much easier.

    BigJ.
     

    mzemina

    Retired Team Member
  • Premium Supporter
  • February 23, 2005
    2,065
    14
    Tulsa, OK
    Home Country
    United States of America United States of America
    Could this be a problem with someone that has alot of mail (maybe went away on holiday with no network connectivity) and comes back to look at their mail on MP. Wonder if there souldn't be a limit and notificatoin when the number of email exceeds that limit. I wouldn't want this plugin to eat up memory. What do you think?

    Mike
     

    bigj

    Portal Pro
    January 10, 2005
    245
    1
    mzemina said:
    Could this be a problem with someone that has alot of mail (maybe went away on holiday with no network connectivity) and comes back to look at their mail on MP. Wonder if there souldn't be a limit and notificatoin when the number of email exceeds that limit. I wouldn't want this plugin to eat up memory. What do you think?

    Mike

    RAM - I don't think this would use any more system memory than the current system. AFAICT, the current system provides backgroud gets of new mails. It's not obvious to me yet, but I _think_ the email lists are held in system memory. Changing it to using a db would mean the data is moved directly to disk (albeit via a cache), so using a db should reduce ram load to a constant regardless of how many emails are received.

    Disk usage - That said, when considering disk usage it would certainly be useful to have a 'max records' limit as a user configurable option. The user would have to flush existing (read) emails before getting more.

    I think this is still consistent with the expected usage pattern - i.e. The mail plugin is a convenient view onto incoming mails - it's not intended to be a fully fledged mail client.

    It might help with usability too - currently if you get 100s of emails the GUI window is slow to update/navigate - having a reasonable 'cached email records' limit would also limit this negative effect.

    This is speculative atm, I really wanted to make sure that if I did pursue this that I wouldn't be redoing some work or undermining some work some other dev is doing - the changes might prove difficult to merge.

    Any other ideas/feedback are welcome.

    BigJ.
     

    ofremont

    New Member
    December 2, 2005
    1
    0
    problem with MIME message and mymail plugin

    I have noticied that the mymail plugin does not work with some email servers. In particular, the problem is in the display of certain kinds of MIME messages with multimple attachments.

    For example, often in the mymail plugin windows, the text displayed within the body section is the "html" section of the MIME message.

    Note that I have tried with both the 0.1.3 and the 0.2 RC1 and the issue remains.

    Have you noticed these problems yourself with this plugin? Do you know how to solve these buggs? Are you planning to stabilize this module before working on additional features?

    Thanks for you help.
     

    bigj

    Portal Pro
    January 10, 2005
    245
    1
    Re: problem with MIME message and mymail plugin

    ofremont said:
    Have you noticed these problems yourself with this plugin? Do you know how to solve these buggs? Are you planning to stabilize this module before working on additional features?

    I've gone back to basics with the MyMail plugin: I'm reworking the module so that it works as a general 'messaging' module. "My Messages" if you like :)

    Instead of servers/mailboxes there will be multiple abstract providers. A provider can be a POP3 server or anything else (that someone implements).

    One example/idea I had: A scraper for the forums that extracted any messages with [ANNOUNCEMENT] in the subject.

    In the first case I'm refactoring the code so that I have a POP3 provider and all messages are stored in a messages database. All existing functionality should remain - and therefore (probably) existing bugs.

    If I get as far as a working plugin I'll release it and then consider any required fixes.

    The extra functionality I want to add - as described at the top of this thread - will come on line later.

    HTH,
    BigJ.
     

    idioteque

    Retired Team Member
  • Premium Supporter
  • September 29, 2005
    609
    9
    Home Country
    Netherlands Netherlands
    question

    COuld you write the login name and password in the XML NOT IN PLAIN TXT

    because now the password is visable in plain sight in the mediaportal.xml.

    perhaps hash the username and pass
     

    Users who are viewing this thread

    Top Bottom