Class: MnoEnterprise::MailAdapters::Adapter Abstract
- Inherits:
-
Object
- Object
- MnoEnterprise::MailAdapters::Adapter
- Defined in:
- lib/mno_enterprise/mail_adapters/adapter.rb
Overview
This class is abstract.
Subclass and override #client and #deliver to implement a custom Mailer Adapter.
Direct Known Subclasses
Class Method Summary collapse
-
.base_deliveries ⇒ Array
Store the list of emails that are pending to be sent.
- .client ⇒ Object
-
.deliver(template, from, to, vars = {}, opts = {}) ⇒ Object
Send a template.
-
.test? ⇒ Boolean
Check whether mailers are in test mode or not.
Class Method Details
.base_deliveries ⇒ Array
Note:
Only used for testing
Store the list of emails that are pending to be sent.
14 15 16 |
# File 'lib/mno_enterprise/mail_adapters/adapter.rb', line 14 def base_deliveries @base_deliveries ||= [] end |
.client ⇒ Object
26 27 28 |
# File 'lib/mno_enterprise/mail_adapters/adapter.rb', line 26 def client raise NotImplementedError end |
.deliver(template, from, to, vars = {}, opts = {}) ⇒ Object
Send a template
45 46 47 |
# File 'lib/mno_enterprise/mail_adapters/adapter.rb', line 45 def deliver(template,from,to,vars = {},opts = {}) raise NotImplementedError end |
.test? ⇒ Boolean
Check whether mailers are in test mode or not. Emails should not be sent in test mode.
22 23 24 |
# File 'lib/mno_enterprise/mail_adapters/adapter.rb', line 22 def test? (Rails.configuration.action_mailer.delivery_method || '').to_sym == :test end |