The issue with this behavior is that core knows about all other modules (core should be agnostic about possible implementations) and it can't be compiled due to cyclic dependencies (javamail() method should provide a way to find the right builder that works even after refactoring code of JavaMail module).
Another possibility is simply to "centralize" all builders in ogham-all module:
Currently developer must know about Builder classes to chain and configure:
There should be direct access to well-known senders and template engines:
The issue with this behavior is that core knows about all other modules (core should be agnostic about possible implementations) and it can't be compiled due to cyclic dependencies (javamail() method should provide a way to find the right builder that works even after refactoring code of JavaMail module).
Another possibility is simply to "centralize" all builders in ogham-all module:
However, if we don't use
ogham-all
module, we won't benefit from this helper.