当前位置: 动力学知识库 > 问答 > 编程问答 >

ruby on rails - Sending custom email message on devise user creation

问题描述:

So I need to send a confirmation email every time a user signs up. There are two ways of signing up -- either when a user hits my login page, or when he is invited by another user. In both cases, I want to send separate types of email (in the second case, I also want to tell them that you were sent invitation by [email protected] person etc.). What is the best way to do this? I am using devise for rails.

网友答案:

use action mailer for sending email

you can send email by using callback means that if you user sign up then below method call

after_create :send_mail_to_xxx_xxx
def send_mail_to_xxx_xxx 
  ... 
  ...
end
分享给朋友:
您可能感兴趣的文章:
随机阅读: