I'm writing a program where someone can set up an email (To, CC, Subject, Body, etc.). They can then set up various triggers that will cause an email to be sent using the set up they defined.
How would that be modeled? Would I have an EmailTemplate
class that would store the email setup, and then and EmailMessage
class that would represent an actual instance of an email that was sent?
To make this more applicable to others who may find this question, how do you model a class that is used to create an instance of another class (did I word that correctly?)?
Is there a better way? Am I over-complicating it?
Beside what @MikeSW have already said, you seem to try to do BDUF. Try with a simple version first - then it will be easier to imagine how you would like your clients to use it, and then redesign and refactor using small steps (which makes TDD applicable, as noted by MikeSW).
Regarding your question about a class that creates instances of another class - you're referring to the Factory pattern. And in fact, this seems like a good way to go for an email API. Consider this design: http://www.limilabs.com/blog/send-email-with-attachment - it is designed in this way ("builder" is a nickname for "factory").