Closed ycourse closed 10 years ago
There are several possibilities. I recommend subscribing the new user to a MailChimp list and sending them a welcome email as a MailChimp action. See my book ‘Learn Ruby on Rails’ for how o subscribe a user to a MailChimp list.
Alternatively, you can send an email directly from the application. Look at app/models/user.rb and see how the expire method sends an email:
def expire
UserMailer.expire_email(self).deliver
destroy
end
You could add a method like this, to send an email when a new user is created:
before_save :send_welcome
def send_welcome
UserMailer.welcome_email(self).deliver
end
Thank You Daniel.
Hello,
How to send a email for a new subscription ?
Thx.