Class: ActionMailer::DeliveryMethods::Maildir

Inherits:
Object
  • Object
show all
Defined in:
lib/actionmailer-maildir.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(settings = {}) ⇒ Maildir

Returns a new instance of Maildir.



12
13
14
15
16
# File 'lib/actionmailer-maildir.rb', line 12

def initialize(settings = {})
  self.settings = settings
  @maildir = ::Maildir.new(settings[:path])
  @maildir.serializer = ::Maildir::Serializer::Mail.new
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



9
10
11
# File 'lib/actionmailer-maildir.rb', line 9

def path
  @path
end

#settingsObject

Returns the value of attribute settings.



10
11
12
# File 'lib/actionmailer-maildir.rb', line 10

def settings
  @settings
end

Instance Method Details

#deliver!(mail) ⇒ Object



18
19
20
# File 'lib/actionmailer-maildir.rb', line 18

def deliver!(mail)
  @maildir.add(mail) # writes an RFC2822 message to disk
end