Module: Postal

Defined in:
lib/postal.rb,
lib/postal/error.rb,
lib/postal/client.rb,
lib/postal/config.rb,
lib/postal/message.rb,
lib/postal/version.rb,
lib/postal/attachment.rb,
lib/postal/header_set.rb,
lib/postal/send_result.rb,
lib/postal/send_message.rb,
lib/postal/message_scope.rb,
lib/postal/send_raw_message.rb

Defined Under Namespace

Classes: Attachment, Client, Config, Error, HeaderSet, Message, MessageNotFound, MessageScope, SendError, SendMessage, SendRawMessage, SendResult

Constant Summary collapse

VERSION =
'1.0.1'

Class Method Summary collapse

Class Method Details

.configObject



6
7
8
# File 'lib/postal.rb', line 6

def self.config
  @config ||= Config.new
end

.configure(&block) ⇒ Object



10
11
12
# File 'lib/postal.rb', line 10

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

.send_message(&block) ⇒ Object



14
15
16
# File 'lib/postal.rb', line 14

def self.send_message(&block)
  Postal::Client.instance.send_message(&block)
end

.send_raw_message(&block) ⇒ Object



18
19
20
# File 'lib/postal.rb', line 18

def self.send_raw_message(&block)
  Postal::Client.instance.send_raw_message(&block)
end