Throughout this book, and also in this chapter, we have worked on features that would need to e-mail the customer. We haven't actually implemented any e-mailing functionality to our store. Let's have a brief look at how we could do this.
To make a flexible e-mail system, we should be able to plug in e-mail templates and change how we would deliver the e-mail. We already have a template system in our framework, which can take view templates, and interchange data where template variables are.
We could take this system, and use it for e-mails, building a populated e-mail template. Within this object, we could code functionality to send the e-mail using PHP
mail() (most-commonly available), SMTP (primarily useful for Windows servers ...