Hi Stephen,
if you don't want to deal with all the internal stuff, we have the ezcMailComposer, which provides a convenience facade for the most common cases in a single object. That is: Simple text mail, HTML mail, HTML / Text alternative, Attachements. You only need to deal with very few objects. Find an example here:
http://incubator.apache.org/zetacomponents/documentation/trunk/Mail/tutorial.html#sending-a-mail-with-the-composer
However, if you need to build more complex mail, you still can do it. And I think that's the more important point here.
We do not make use of classical getters and setters, but instead use overloading to allow you simple $foo->bar access to properties. Therefore we wrap the email address into a dedicated object. I personally don't consider its usage daunting, do you?
I'm not sure what you mean with your last sentence. It somewhat sounds like a dependency injection container (DIC). Did I get it wrong? If now, we don't have a DIC in Zeta Components. Our way of handling configuration of components are option classes. You can create an instance of an option class, which validates the configuration values you set, and then submit it to the constructor of the class you want to instantiate. This mechanism can of course be used to integrate Zeta Components into a DIC.
HTH,
Toby
↧