require 'pp' #For debugging require "mongoid" require "mail_spy/engine" require "mail_spy/manager" module MailSpy extend MailSpy::Manager # --------------------------------------------- Configuration # Allows the client to configure and add esps to MailSpy MailSpyESP = Struct.new( :address, :port, :authentication, :user_name, :password, :domain, :enable_starttls_auto, :name ) @@esps = {} #@@config = MailSpyConfig.new # Allows the initializer to set the configuration #def self.configure(&block) # block.call(@@config) #end #TODO eventually have this be a view with a interface def self.add_email_service_provider(&block) esp = MailSpyESP.new block.call(esp) @@esps[esp.name] = esp end def self.esps @@esps end end