【发布时间】:2014-02-08 14:42:12
【问题描述】:
当用户点击忘记密码并输入他的电子邮件 ID 时,我正在尝试向用户的电子邮件发送密码重新生成链接。
这是我正在使用的动作邮件方法
class Notifier < ActionMailer::Base
default from: "myemailid"
def deliver_password_reset_instructions(user)
email = "myemailid"
subject= "Password Reset Instructions"
sent_on = Time.now
body={:edit_password_reset_url=>edit_password_reset_url(user.perishable_token)}
mail(:to=>email,:subject=>subject)
end
end
这是通知器内部的视图
A request to reset your password has been made. If you did not make this request,
simply ignore this email. If you did make this request just click the link below:
<%= @edit_password_reset_url %>
If the above URL does not work try copying and pasting it into your browser.
If you continue to have problem please feel free to contact us.
Everything else is getting sent but the link is not sent.
I cant seem to find out the problem so pls if any one knows how to solve this issue,pls help.
【问题讨论】:
标签: ruby-on-rails mailer