#26 send emails with Action Mailer - Complete Guide
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
Featured in playlists
![#26 send emails with Action Mailer - Complete Guide](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTgyMywicHVyIjoiYmxvYl9pZCJ9fQ==--d40bcd4bc039ead7787e4d7843ab790b03db6880/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
![#27 Gem Letter Opener - best way to preview emails in development](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTc1OSwicHVyIjoiYmxvYl9pZCJ9fQ==--8613ea91b34805cab0b8fe22986a395073dfe898/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
![#28 Action Mailer: Gmail SMTP - send emails in production for free](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTgwMiwicHVyIjoiYmxvYl9pZCJ9fQ==--a4703f2e3e3af30b480de327b36d1c9a260199f9/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
Recommended based on what you are watching now
![#59 Hotwire Turbo Streams CRUD](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTc4MiwicHVyIjoiYmxvYl9pZCJ9fQ==--7b4b94ff669cbcd3485cfcc3f72e9100df7eae48/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
#59 Hotwire Turbo Streams CRUD
![#150 Global Search](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTk0NSwicHVyIjoiYmxvYl9pZCJ9fQ==--2476c8761d99308f56f56d348eaba4dbd0e2b820/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
#150 Global Search
![#37 Install Bootstrap 5 with Rails 6, Yarn and Webpacker](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTgxNywicHVyIjoiYmxvYl9pZCJ9fQ==--e7ec9f84df32b684e3467ac23a12f61e3348e992/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)