Module: MailSpy

Extended by:
Manager
Defined in:
lib/mail_spy.rb,
lib/mail_spy/engine.rb,
lib/mail_spy/manager.rb,
lib/mail_spy/version.rb,
app/models/mail_spy/email.rb,
app/models/mail_spy/action.rb,
app/models/mail_spy/process_log.rb,
app/mailers/mail_spy/core_mailer.rb,
app/helpers/mail_spy/email_helper.rb,
app/models/mail_spy/stream_report.rb,
app/helpers/mail_spy/reports_helper.rb,
app/models/mail_spy/campaign_report.rb,
app/helpers/mail_spy/sendgrid_helper.rb,
app/models/mail_spy/component_report.rb,
lib/mail_spy/sendgrid/smtp_api_header.rb,
app/helpers/mail_spy/application_helper.rb,
app/controllers/mail_spy/reports_controller.rb,
app/controllers/mail_spy/sendgrid_controller.rb,
app/controllers/mail_spy/tracking_controller.rb,
lib/generators/mail_spy/initializer_generator.rb,
app/controllers/mail_spy/application_controller.rb

Defined Under Namespace

Modules: ApplicationHelper, EmailHelper, Manager, ReportsHelper, Sendgrid, SendgridHelper Classes: Action, ApplicationController, CampaignReport, ComponentReport, CoreMailer, Email, Engine, InitializerGenerator, MailSpyConfig, MailSpyESP, ProcessLog, ReportsController, SendgridController, StreamReport, TrackingController

Constant Summary collapse

VERSION =
"0.1.1"
@@esps =
{}
@@config =
MailSpyConfig.new

Class Method Summary collapse

Methods included from Manager

create_email, send_outstanding_emails, track_action

Class Method Details

.add_email_service_provider(&block) ⇒ Object

TODO eventually have this be a view with a interface



34
35
36
37
38
39
40
# File 'lib/mail_spy.rb', line 34

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

.aws_access_key_idObject



54
55
56
# File 'lib/mail_spy.rb', line 54

def self.aws_access_key_id
  @@config.aws_access_key_id
end

.aws_campaign_bucketObject



62
63
64
# File 'lib/mail_spy.rb', line 62

def self.aws_campaign_bucket
  @@config.aws_campaign_bucket
end

.aws_secret_access_keyObject



58
59
60
# File 'lib/mail_spy.rb', line 58

def self.aws_secret_access_key
  @@config.aws_secret_access_key
end

.configure(&block) ⇒ Object

Allows the initializer to set the configuration



29
30
31
# File 'lib/mail_spy.rb', line 29

def self.configure(&block)
  block.call(@@config)
end

.espsObject



42
43
44
# File 'lib/mail_spy.rb', line 42

def self.esps
  @@esps
end

.template_directoryObject



50
51
52
# File 'lib/mail_spy.rb', line 50

def self.template_directory
  @@config.template_directory
end

.tracker_hostObject



46
47
48
# File 'lib/mail_spy.rb', line 46

def self.tracker_host
  @@config.tracker_host
end

.using_delayed_jobObject



66
67
68
# File 'lib/mail_spy.rb', line 66

def self.using_delayed_job
  @@config.using_delayed_job
end