Class: EmailEvents::Adapters::Sendgrid::Initializer
- Inherits:
-
Abstract::Initializer
- Object
- Abstract::Initializer
- EmailEvents::Adapters::Sendgrid::Initializer
- Defined in:
- lib/email_events/adapters/sendgrid/initializer.rb
Class Method Summary collapse
Class Method Details
.initialize ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/email_events/adapters/sendgrid/initializer.rb', line 11 def self.initialize Gridhook.configure do |config| config.event_receive_path = '/email_events/sendgrid' config.event_processor = EmailEvents::Service::HandleEvent end end |
.load_adapter? ⇒ Boolean
6 7 8 9 |
# File 'lib/email_events/adapters/sendgrid/initializer.rb', line 6 def self.load_adapter? smtp_settings = Rails.configuration.action_mailer.smtp_settings smtp_settings.present? && smtp_settings[:address].include?('sendgrid') end |