lib/mail_spy.rb in mail_spy-0.0.5 vs lib/mail_spy.rb in mail_spy-0.0.6

- old
+ new

@@ -1,7 +1,8 @@ require 'pp' #For debugging require 'aws-sdk' +require 'mail_spy/sendgrid/smtp_api_header' require "mongoid" require "mail_spy/engine" require "mail_spy/manager" module MailSpy @@ -9,11 +10,11 @@ # --------------------------------------------- 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 + :enable_starttls_auto, :name, :options ) @@esps = {} MailSpyConfig = Struct.new( :tracker_host, :aws_access_key_id, @@ -28,10 +29,12 @@ end #TODO eventually have this be a view with a interface def self.add_email_service_provider(&block) esp = MailSpyESP.new + esp.options = {} # Important! provides default options list for internals block.call(esp) + esp.options.to_options! @@esps[esp.name] = esp end def self.esps @@esps