I would like send email with html.erb template and I have some code. Like this:
class Mailer < ActionMailer::Base def notification(to_email) begin mail(to: '[email protected]', subject: "Test message") rescue Exception => e return end end end
And some html.erb file:
Hello, <%= @name %>.
But I don't know how to attach this template for my method. Help me please with this issue, because i can't fount normally manual about it.