Sha256: 0552d77660d286e16902aae568a941a1279d44b1e414ef4d0fa0760ce0673956
Contents?: true
Size: 1001 Bytes
Versions: 9
Compression:
Stored size: 1001 Bytes
Contents
class Mailer < ActionMailer::Base REPLY_TO = "reply-to@example.com" TO = "to@example.com" CC = "cc@example.com" BCC = "bcc@example.com" FROM = "from@example.com" SUBJECT = "SUBJECT" if Rails.version >= "3" def email attachments['attached_file.pdf'] = File.open("#{Rails.root}/public/fixture_files/attachment.pdf", "w") {} mail( :from => FROM, :reply_to => REPLY_TO, :to => TO, :cc => CC, :bcc => BCC, :subject => SUBJECT ) end def html_email_with_links email end def text_email_with_links email end else def email attachments['attached_file.pdf'] = File.open("#{Rails.root}/public/fixture_files/attachment.pdf", "w") {} recipients TO reply_to REPLY_TO from FROM cc CC bcc BCC subject SUBJECT body BODY end def html_email_with_links email end def text_email_with_links email end end end
Version data entries
9 entries across 9 versions & 1 rubygems