How do I get it to send me the first email? it only sends the last one and i want it to send both of them.
In the email and emailsoli fields, each field has a saved email.
class ReunionMailer < ApplicationMailer
default from: '[email protected]'
def autorizar_email(reunion)
@reunion = reunion
@url = 'http://example.com/login'
mail(to: @reunion.email , subject: 'Autorización de aprovador')
mail(to: @reunion.emailsoli , subject: 'Autorización de aprovador')
end
end
meeting.erb
def autorizar
if self.auto = true
ReunionMailer.autorizar_email(Reunion.find(self.id)).deliver_now
end
end