This repository has been archived by the owner on Dec 21, 2019. It is now read-only.
forked from beam/action-mailer-queue
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
37 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
vendor/plugins/active_mailer_queue/lib/action_mailer/queue.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module ActionMailer | ||
class Queue < ActionMailer::Base | ||
|
||
@@delivery_method = :activemailer_queue | ||
cattr_accessor :delivery_method | ||
|
||
def self.queue | ||
return new.queue | ||
end | ||
|
||
def queue | ||
return Store.create_by_table_name(self.class.to_s.downcase.pluralize) | ||
end | ||
|
||
def perform_delivery_activemailer_queue(mail) | ||
store = self.queue.new(:tmail => mail) | ||
store.save | ||
mail.queue_id = store.id | ||
return true | ||
end | ||
|
||
end | ||
end |
5 changes: 5 additions & 0 deletions
5
vendor/plugins/active_mailer_queue/lib/action_mailer/queue_mailer.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module ActionMailer | ||
class Queue < ActionMailer::Base | ||
class Mailer < ActionMailer::Base; end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module TMail | ||
class Mail | ||
attr_accessor :queue_id | ||
end | ||
end |