Last active
February 18, 2019 17:42
-
-
Save pcasaretto/81633d12ad7eb70b9575ed0f2c217de6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseUserMailer | |
def initialize(smtp_settings) | |
@client = MailSendingLibrary.new(smtp_settings) | |
end | |
def send_mail(user, mail) | |
@client.send_mail(user.email, mail.body) | |
end | |
end | |
class TransactionalMailer < BaseUserMailer | |
SMTP_SETTINGS = ... | |
def initialize() | |
super(SMTP_SETTINGS) | |
end | |
end | |
class MarketingMailer < BaseUserMailer | |
SMTP_SETTINGS = ... | |
def initialize() | |
super(SMTP_SETTINGS) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment