Module: SendGridSmtpApi::InstanceMethods
- Defined in:
- lib/send_grid.rb
Instance Method Summary collapse
- #mail_with_sendgrid(headers = {}, &block) ⇒ Object
- #open_tracking(enabled = true) ⇒ Object
- #send_grid_header ⇒ Object
Instance Method Details
#mail_with_sendgrid(headers = {}, &block) ⇒ Object
20 21 22 23 24 |
# File 'lib/send_grid.rb', line 20 def mail_with_sendgrid(headers={}, &block) mail_without_sendgrid(headers, &block).tap do || .instance_variable_set :@sendgrid_header, sendgrid_header end end |
#open_tracking(enabled = true) ⇒ Object
26 27 28 |
# File 'lib/send_grid.rb', line 26 def open_tracking(enabled = true) add_filter_setting(:opentrack, :enabled, enabled ? 1 : 0) unless enabled.nil? end |
#send_grid_header ⇒ Object
16 17 18 |
# File 'lib/send_grid.rb', line 16 def send_grid_header @send_grid_header ||= SendGridSmtpApi::ApiHeader.new end |