Class: Card::Mailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- Card::Mailer
- Defined in:
- lib/card/mailer.rb
Constant Summary collapse
Class Method Summary collapse
Class Method Details
.layout(message) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/card/mailer.rb', line 23 def layout <<-HTML <!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8"/> </head> <body> #{} </body> </html> HTML end |
.new_mail(*args, &block) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/card/mailer.rb', line 14 def new_mail *args, &block mail = Mail.new(args, &block) method = Card::Mailer.delivery_method mail.delivery_method(method, Card::Mailer.send(:"#{method}_settings")) mail.perform_deliveries = Card::Mailer.perform_deliveries mail.raise_delivery_errors = Card::Mailer.raise_delivery_errors mail end |