#26 send emails with Action Mailer - Complete Guide

18/05/2021
Free

In this episode we will use ActionMailer to send the User an email after he creates a Post. We will also explore different options and ways to customise our emails.

Action Mailer docs:
https://guides.rubyonrails.org/action_mailer_basics.html
Source Code for the Episode:
https://github.com/corsego/26-action-mailer/commit/6519734de30c87b39d90e726ebb602a23ff0fd40
My text notes for this episode: https://blog.corsego.com/action-mailer-basics

0:00 Intro
0:47 Generate a new Mailer
3:30 Preview the mailer
4:00 Override default FROM address
4:40 Override TO, CC, BCC email address
6:10 Override email SUBJECT
7:34 Send email from controller
9:20 custom email params (current_user, post)
11:34 add sender name to default FROM address
13:45 Attach image
15:15 Display attached image inside email body
16:12 Update signature for all emails

0
Sign in to join the conversation