Class: ActionMailer::Base
- Inherits:
-
Object
- Object
- ActionMailer::Base
- Defined in:
- lib/am-sendgrid.rb
Instance Method Summary collapse
- #create_mail_with_sendgrid_header ⇒ Object
- #sendgrid_category(category) ⇒ Object
- #sendgrid_filter_setting(*args) ⇒ Object
- #sendgrid_header ⇒ Object
Instance Method Details
#create_mail_with_sendgrid_header ⇒ Object
11 12 13 14 |
# File 'lib/am-sendgrid.rb', line 11 def create_mail_with_sendgrid_header headers["X-SMTPAPI"] = sendgrid_header.asJSON if sendgrid_header create_mail_without_sendgrid_header end |
#sendgrid_category(category) ⇒ Object
22 23 24 |
# File 'lib/am-sendgrid.rb', line 22 def sendgrid_category(category) sendgrid_header.setCategory category end |
#sendgrid_filter_setting(*args) ⇒ Object
18 19 20 |
# File 'lib/am-sendgrid.rb', line 18 def sendgrid_filter_setting(*args) sendgrid_header.addFilterSetting *args end |
#sendgrid_header ⇒ Object
7 8 9 |
# File 'lib/am-sendgrid.rb', line 7 def sendgrid_header @sendgrid_header ||= SmtpApiHeader.new end |