简体   繁体   English

当我覆盖它的邮件程序时,Devise 正在发送带有空白正文的电子邮件

[英]Devise is sending e-mails with blank bodies when I override it's mailer

I am trying to override Devise's default mailer to implement some custom functionality.我试图覆盖 Devise 的默认邮件程序以实现一些自定义功能。 Devise is sending the e-mails, but with blank bodies. Devise 正在发送电子邮件,但正文为空白。 I stripped my custom Mailer of all it's functionality and made it as bare bone as possible, but to no avail.我剥离了我的自定义 Mailer 的所有功能,并使其尽可能简单,但无济于事。 Here is my code.这是我的代码。

# config/initializers/devise.rb
config.mailer = DeviseMailer

# app/mailers/devise_mailer.rb
class DeviseMailer < Devise::Mailer
end

The class you wrote expects its views to be at app/views/devise_mailer/.您编写的 class 希望其视图位于 app/views/devise_mailer/。 If you want to use the devise bodies, generate them or add them the view path.如果要使用 devise 主体,请生成它们或将它们添加到视图路径中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM