Chapter 10. Mailers
Many applications need to send email. Merb Mailers allow you to do this easily with the same controller and view conventions the rest of your application follows. The Mailer
class is thus a subclass of AbstractController
, and the relevant templates are standardly placed in app/mailers/views
. In this chapter we’ll configure, generate, describe, and test mailers used in Merb applications.
10.1 Configuration
If you don’t configure Merb otherwise, it tries to use SMTP locally when asked to deliver mail. In most cases these exact defaults do not suffice, but alternative configurations are as simple as a few extra lines in either config/init.rb
or one of the environment config files in a before_app_loads
block. Below we describe ...
Get The Merb Way 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.