prepare bounced job
This commit is contained in:
parent
d5bcc32699
commit
602a079f18
2
Gemfile
2
Gemfile
|
@ -27,7 +27,7 @@ gem "ruby2js" , git: "https://github.com/ruby2js/ruby2js/" , branch: "haml_fix"
|
||||||
gem 'thredded', '~> 1.0'
|
gem 'thredded', '~> 1.0'
|
||||||
gem "rest-client"
|
gem "rest-client"
|
||||||
gem "pundit"
|
gem "pundit"
|
||||||
|
gem "net-imap"
|
||||||
gem "simple_form" , "5.1.0"
|
gem "simple_form" , "5.1.0"
|
||||||
gem "simple_form_tailwind_css"
|
gem "simple_form_tailwind_css"
|
||||||
|
|
||||||
|
|
|
@ -448,6 +448,7 @@ DEPENDENCIES
|
||||||
kaminari
|
kaminari
|
||||||
merged!
|
merged!
|
||||||
mina
|
mina
|
||||||
|
net-imap
|
||||||
passenger
|
passenger
|
||||||
pg (~> 1.1)
|
pg (~> 1.1)
|
||||||
pundit
|
pundit
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
class BouncedJob < ApplicationJob
|
||||||
|
queue_as :default
|
||||||
|
|
||||||
|
def perform(*args)
|
||||||
|
# Do something later
|
||||||
|
end
|
||||||
|
end
|
||||||
|
# imap = Net::IMAP.new('imap.migadu.com' , ssl: true)
|
||||||
|
# imap.authenticate("LOGIN" , Rails.application.credentials.admin_email , Rails.application.credentials.
|
||||||
|
# admin_pass)
|
||||||
|
#
|
||||||
|
# imap.search(["SINCE", "1-Feb-2023"]).each do |message_id|
|
||||||
|
# irb(main):023:1* envelope = imap.fetch(message_id, "ENVELOPE")[0].attr["ENVELOPE"]
|
||||||
|
# irb(main):024:1* puts "#{envelope.from[0].name}: \t#{envelope.subject}"
|
||||||
|
# irb(main):025:0> end
|
|
@ -0,0 +1,7 @@
|
||||||
|
require "test_helper"
|
||||||
|
|
||||||
|
class BouncedJobTest < ActiveJob::TestCase
|
||||||
|
# test "the truth" do
|
||||||
|
# assert true
|
||||||
|
# end
|
||||||
|
end
|
Loading…
Reference in New Issue