Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Commit

Permalink
Update the README
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Markow authored and Dylan Markow committed Apr 29, 2008
1 parent 481e07d commit 6c7664a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
19 changes: 15 additions & 4 deletions README
@@ -1,13 +1,24 @@
TmailBounceParser
=================

Introduction goes here.

This is based on Recipe 70 of Rails Recipes: "Handling Bounced Email". It has been updated
to include implementations for non-standard servers that don't include the message/delivery-status
and message/rfc822 parts.

Example
=======

Example goes here.
message = TMail::Mail.parse(STDIN)
undeliverable_info = message.undeliverable_info

undeliverable_info.original_sender
# => "user@example.com"

undeliverable_info.message_id
# => "1242351jfsh235j523j@ggds.sa"

undeliverable_info.status
# => "Failure"


Copyright (c) 2008 [name of plugin creator], released under the MIT license
Released under the MIT license
4 changes: 2 additions & 2 deletions lib/tmail_bounce_parser.rb
Expand Up @@ -6,7 +6,7 @@
module TmailBounceParser

class BouncedDelivery
attr_accessor :status_info, :original_message_id, :original_sender, :original_recipient, :original_subject
attr_accessor :status_info, :original_message_id, :original_sender, :original_recipient, :original_subject, :handling_server
def self.from_email(email)
returning(bounce = self.new) do

Expand Down Expand Up @@ -83,6 +83,6 @@ def status
end

def undeliverable_info
BouncedDelivery.from_email(self)
end
end

0 comments on commit 6c7664a

Please sign in to comment.