Skip to content

Instantly share code, notes, and snippets.

@lilithlavender
Created November 22, 2013 19:18
Show Gist options
  • Select an option

  • Save lilithlavender/7605320 to your computer and use it in GitHub Desktop.

Select an option

Save lilithlavender/7605320 to your computer and use it in GitHub Desktop.
I have a client using our app who needs to be able to parse emails sent as raw text. Other clients prefer HTML formatting. When I have rails send a multipart message it defaults to inserting HTML first, and the client's program can't parse the result. I have correctly created templates for both html.erb and text.erb in the views for this mailer.…
def new_information_request(information_request)
@franchise = information_request.franchise
@franchisee = information_request.franchisee
to = @franchise.lead_emails
subject = "#{TENANT['email_prefix']} New Lead"
mail(to: to, subject: subject ) do |format|
format.text
format.html
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment