Short background: We're using a third party extension so send mail with Mandrill. This extension accomplishes this by overriding the method core/email_template::send()
. I have to implement an e-mail filter to stop all e-mails to be sent to certain fake e-mail addresses, which I would do by also overriding core/email_template::send()
. Simple enough, I would just make sure my module depends on the third party extension using <depend>
in my module configuration.
The problem: If we decide to to inactivate or remove the third party Mandrill extension, my e-mail filter module would stop working since it depends om the third party extension. What I would like is for it to continue working without having to do any modification to it.
Possible solution: Remove the <depend>
and the order of magentos module loading resolv it.
As far as I understand magento, modules are loaded in the order core
, community
and last local
, and then alphabetically within these pools? Since the third party extension is placed in the community pool and my module resides in the local pool, my module will always override and things will work as expected. However, I don't feel this is a very solid solution. If modules gets moved to other pools or get renamed, things could stop working correctly without anyone noticing.