Send an Order Confirmation Email

This lesson explains how to send a confirmation email to the user who places an order.

We will create a mailer model to send a confirmation email to the user who places an order. This model will allow us to send data through email protocols. If you want to skip this lesson and jump into the next chapter, go ahead. This section is more of a warm-up.

Generate mailer

We must first create the order_mailer with an email named send_confirmation by using the command in the terminal below:

$ rails generate mailer order_mailer send_confirmation

Get hands-on with 1400+ tech skills courses.