I suggest do some model refactoring.
By steps:
- Introduce
MailAgentInterface and default ezcomponents/mail implementation. This interface will contain all actions on mails (sending, removing, receiving). This interface represents mail agent from a real life, like mutt and Outlook.
- Refactor
Mailbox and Mail classes to be abstract data containers (Mailbox will be simple collection of Mail objects with some specific methods).
I suggest do some model refactoring.
By steps:
MailAgentInterfaceand default ezcomponents/mail implementation. This interface will contain all actions on mails (sending, removing, receiving). This interface represents mail agent from a real life, like mutt and Outlook.MailboxandMailclasses to be abstract data containers (Mailboxwill be simple collection ofMailobjects with some specific methods).