Posted about 6 years ago. Visible to the public.

Rails: Sending e-mail [2d]



  • In MovieDB, if you did not implement sending a welcome e-mail, send an e-mail now.
  • In MovieDB, whenever someone creates a movie, send a notification to
    • Can you attach a text file (any content) to the e-mail?
    • Can you write a Cucumber feature for this?
    • Hint: Action Mailer has a delivery method like :smtp or :sendmail which can be different for each environment. For the test environment the delivery method is set to :test, which means that new e-mails are stored as objects in the ActionMailer::Base.deliveries array. You can inspect this array in your tests.
  • In the lesson Form Models we said that we don't like to send e-mails in core model callbacks. We would much rather send e-mails from form model callbacks. Why is that?
    • Make sure that MovieDB does not send e-mails from your Movie model, but from a form model like Movie::AsForm.


With your mentor, discuss the challenges of implementing HTML mails well.

Owner of this card:

Henning Koch
Last edit:
about 1 year ago
by Henning Koch
Posted by Henning Koch to makandra Curriculum
This website uses short-lived cookies to improve usability.
Accept or learn more