I’m curious to know how to accomplish this task.
I have a function in my library that will send out an email. However it takes a parameter of $type and the type could be forgot password, successful registration, etc.
I want to be able to set parts of that type such as the subject of it as well as the message to be displayed for the different types of emails in one file to make it easier to edit down the line.
What kind of file should I create inside of codeigniter to accomplish this?
Jeff,
Take a look at Tank Auth, they handle this sort of email thing already (its a small CI plugin/library for authentication, email password recovery, etc).
Just go through the code and pull out the email template you want, it comes in plain text and HTML flavor.
Proably the best way to always learn is to review other code.
Example from the auth.php controller (for reference):
Tank Auth is a good library, and easy to work with.
EDIT