For oa_messages, we should make 'mailhandler_php_imap' optional as there are (or might be) alternative retrieval plugins such as:

that do the same job in the backend. It would definitely enough to install and enable it via a profile (= soft) dependency.

Actually, same holds for the whole 'mailhandler' module.
For basic usage with og, there is a very nice and easy to use alternative called og_mailinglist which is also much faster because it doesn't rely on cronjobs.
If an admin decides to use that one instead, something custom or no mailing list functionality at all, it should be possible. oa_messages doesn't really depend much on it.

What do you think?

Comments

mpotter’s picture

Yep, I agree on this and will try to pull it into it's own module.

Pancho’s picture

Do we really need another oa_submodule in order to decouple mailhandler from oa_messages?
Wouldn't it be enough to make a (soft) dependency in openatrium.info?
It would then be installed and enabled but could later be disabled, if the admin doesn't want it.

mpotter’s picture

Can you tell me more about what you mean by a "soft dependency"?

Pancho’s picture

Modules that are listed as dependency only in the install profile's .info file are generally "soft" dependencies. Didn't you know?
Profile .infos do insist on dependencies being installed and enabed when installing the profile. But after installation the profile lets go, so the modules can later be disbaled or even uninstalled again.
Therefore we can put "hard" dependencies in oa_core.info (or one of the other modules) and "soft" dependencies in openatrium.info.

mpotter’s picture

Hmm, no I didn't know about that. Interesting.

In this case, I still want to pull out MailHandler. The oa_messages module should really be for core Message API support. The MailHandler is only used for handling replies to messages, which is more part of the oa_discussion_post plugin. So pulling that into a separate submodule actually makes sense to me. Open Atrium 2 should work just fine without MailHandler (if you don't need to reply to notifications), so it's not a "core" part that should be in oa_messages.

Will work on this.

mpotter’s picture

First attempt at splitting this is in commit 4daec12. Will close this once the automated build tests pass.

mpotter’s picture

Status: Active » Needs review
mpotter’s picture

Status: Needs review » Fixed

OK, seems good so far. Closing.

seanr’s picture

Status: Fixed » Active

Still required in Alpha 5 - I cannot proceed with the installation. This is a real problem because installing that extension on OSX for local development is such a major pain in the arse - I'd literally have to recompile PHP.

seanr’s picture

Version: 7.x-2.0-alpha3 » 7.x-2.0-alpha5
mpotter’s picture

Status: Active » Fixed

Tracking this in #1999962: Mailhandler PHP IMAP requires that PHP's IMAP extension is enabled in order to function properly. now, so closing this again. As mentioned in the other issue, you can remove the oa_mailhandler dependency in the openatrium.info file to disable this module before running install.php to fix it for now.

Status: Fixed » Closed (fixed)

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