Iteration H1: Sending Confirmation Emails
Sending email in Rails has three basic parts: configuring how email is to be sent, determining when to send the email, and specifying what you want to say. We’ll cover each of these three in turn.
Configuring Email
Email configuration is part of a Rails application’s environment and involves a Rails.application.configure block. If you want to use the same configuration for development, testing, and production, add the configuration to environment.rb in the config directory; otherwise, add different configurations to the appropriate files in the config/environments directory.
Inside the block, you need to have one or more statements. You first have to decide how you want mail delivered:
| config. ... |
Get Agile Web Development with Rails 7 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.