Class: Msg::Bounce

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/msg/bounce.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from(email, message = "") ⇒ Object

This is so far just a quick and slightly dirty console call to turn an email message into a bounce record. With a bit more header-processing we should be able to record type and subtype.



20
21
22
# File 'app/models/msg/bounce.rb', line 20

def self.from(email, message="")
  create(:email => email, :raw_message => message)
end

Instance Method Details

#fatal?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/models/msg/bounce.rb', line 10

def fatal?
  bounce_type == 'Permanent'
end

#transient?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/models/msg/bounce.rb', line 14

def transient?
  bounce_type == 'Transient'
end