When a User
is connected and creates a new Vacation
, an email must be send to chosen validator of the Vacation
. Here's my current ActionMailer
:
class UserNotifier < ActionMailer::Base
default from: "from@example.com"
def send_validation_vacation_email(user, receiver, vacation)
@user = user
@receiver = receiver
@vacation = vacation
mail(:to => receiver.email, :subject => 'Blabla')
end
end
As you can see, I'm able to get all the data I need. However, I don't know how to setup the ActionMailer so that the sender address can be changed.
Do I need to connect the ActionMailer
to the User
model?