Action Mailer: All mail comes from MAILER DAEMON
20 Jun, 2007

Today I was trying to send mail from my Rails application through Action Mailer. This is quite simple, but I wanted to use a custom from-address. So, I create a setup_email method in my UserNotifier class that sets some defaults for every email sent out:

class UserNotifier < ActionMailer::Base
protected
def setup_email(user)
@recipients  = "#{user.email}"
end
From: MAILER DAEMON