Sha256: b7b18ea89b94ec009cb64c79817942312a866a5329fcae84837ffb76df72307f
Contents?: true
Size: 474 Bytes
Versions: 61
Compression:
Stored size: 474 Bytes
Contents
class GeneralMailer < ActionMailer::Base def email(email) mail(headers(email)) do |format| format.text { render text: email.plain_content } format.html { render html: email.html_content.html_safe } end email.mark_as_sent! end private def headers(email) from = "#{email.from_name} <#{email.from_email}>" to = "#{email.to_name} <#{email.to_email}>" { from: from, to: to, subject: email.subject } end end
Version data entries
61 entries across 61 versions & 1 rubygems