Skip to content
Snippets Groups Projects
Commit 1ccfd390 authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

create a mailer to send a email when receive a new contact

parent c0fa1e75
No related branches found
No related tags found
No related merge requests found
class ApplicationMailer < ActionMailer::Base class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com' default from: 'from@example.com'
layout 'mailer' #layout 'mailer'
end end
class ContactsMailer < ApplicationMailer
def new_contact_received(contact)
@contact = contact
@subject = "Contato de " + @contact.name
mail(to: 'marcelaribeirooliveira@gmail.com' , subject: @subject)
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment