##// END OF EJS Templates
Use async email deliveries in rake tasks (#16784)....
Jean-Philippe Lang -
r12848:2d3f3cd9aa45
parent child
Show More
@@ -55,7 +55,9 Examples:
55 END_DESC
55 END_DESC
56
56
57 task :read => :environment do
57 task :read => :environment do
58 MailHandler.receive(STDIN.read, MailHandler.extract_options_from_env(ENV))
58 Mailer.with_synched_deliveries do
59 MailHandler.receive(STDIN.read, MailHandler.extract_options_from_env(ENV))
60 end
59 end
61 end
60
62
61 desc <<-END_DESC
63 desc <<-END_DESC
@@ -122,7 +124,9 END_DESC
122 :move_on_success => ENV['move_on_success'],
124 :move_on_success => ENV['move_on_success'],
123 :move_on_failure => ENV['move_on_failure']}
125 :move_on_failure => ENV['move_on_failure']}
124
126
125 Redmine::IMAP.check(imap_options, MailHandler.extract_options_from_env(ENV))
127 Mailer.with_synched_deliveries do
128 Redmine::IMAP.check(imap_options, MailHandler.extract_options_from_env(ENV))
129 end
126 end
130 end
127
131
128 desc <<-END_DESC
132 desc <<-END_DESC
@@ -149,7 +153,9 END_DESC
149 :password => ENV['password'],
153 :password => ENV['password'],
150 :delete_unprocessed => ENV['delete_unprocessed']}
154 :delete_unprocessed => ENV['delete_unprocessed']}
151
155
152 Redmine::POP3.check(pop_options, MailHandler.extract_options_from_env(ENV))
156 Mailer.with_synched_deliveries do
157 Redmine::POP3.check(pop_options, MailHandler.extract_options_from_env(ENV))
158 end
153 end
159 end
154
160
155 desc "Send a test email to the user with the provided login name"
161 desc "Send a test email to the user with the provided login name"
General Comments 0
You need to be logged in to leave comments. Login now