Ruby/Rails: How do you customize the mailer templates of Devise?

后端 未结 6 893
Happy的楠姐
Happy的楠姐 2020-12-08 03:45

I\'ve installed Devise for my Rails app (3.0.1) and it\'s mostly working. I just can\'t seem customize the mailer views.

  • My user model is \"User\".
6条回答
  •  旧巷少年郎
    2020-12-08 04:34

    If you are interested in not using Devise's default usage of ActionMailer and would instead like to send customized emails with an API from a service like SendGrid, Mailgun, or Postmark you will need to create a custom Mailer that subclasses Devise::Mailer and overrides its "notification" methods.

    Here is an example using Mailgun.

提交回复
热议问题