#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
Destacado en listas
![#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)
Recomendado según lo que estás viendo ahora
![#30 Social log in with Github (omniauth 2.0)](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTg5NSwicHVyIjoiYmxvYl9pZCJ9fQ==--a2ebfee8d923c8e23321fc7af7d1abf5ae47fe5a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
#30 Social log in with Github (omniauth 2.0)
![#36 Action Text - Rich text editing with Trix](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTc3MywicHVyIjoiYmxvYl9pZCJ9fQ==--61c7d5cf7add028796a21c0d4dd8e9dba1ac45fc/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)