Sha256: 4697bd2b080c19dbc90dc079d3d349c36d4b624249d539970ef3233107be3711
Contents?: true
Size: 596 Bytes
Versions: 7
Compression:
Stored size: 596 Bytes
Contents
module Email; end class Email::Provider def self.for_address(address) case when address.end_with?("@fastmail.com") new(:fastmail) when address.end_with?("@gmail.com") new(:gmail) when address.end_with?("@fastmail.fm") new(:fastmail) else new(:default) end end attr_reader :provider def initialize(provider) @provider = provider end def options {port: 993, ssl: {ssl_version: :TLSv1_2}} end def host case provider when :gmail "imap.gmail.com" when :fastmail "imap.fastmail.com" end end end
Version data entries
7 entries across 7 versions & 1 rubygems