One topic that we never covered in regards to Rails was how to properly generate mailers (automatically generated emails from a web application).
I’m covering this because I have not used mailers before, and I think it’s a pretty pertinent feature of Rails that everyone should know.
I’ll be using the example of a distributed solar generation product. Whenever a consumer is experiencing unusually low solar energy production or energy generation patterns consistent with a malfunctioning module, it will send out a mailer notifying them of these issues. In order to generate a mailer, you type in the following command:
The next step is to set up the default settings of the mailer.
1 2 3 4 5 6 7
After we have set up the default settings for the mailer, then we go to the Panel model in order to specify when the mailer should be sent out.
1 2 3 4 5 6 7 8 9 10