@@ -55,8 +55,10 Examples: | |||||
55 | END_DESC |
|
55 | END_DESC | |
56 |
|
56 | |||
57 | task :read => :environment do |
|
57 | task :read => :environment do | |
|
58 | Mailer.with_synched_deliveries do | |||
58 | MailHandler.receive(STDIN.read, MailHandler.extract_options_from_env(ENV)) |
|
59 | MailHandler.receive(STDIN.read, MailHandler.extract_options_from_env(ENV)) | |
59 | end |
|
60 | end | |
|
61 | end | |||
60 |
|
62 | |||
61 | desc <<-END_DESC |
|
63 | desc <<-END_DESC | |
62 | Read emails from an IMAP server. |
|
64 | Read emails from an IMAP server. | |
@@ -122,8 +124,10 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 | |||
|
127 | Mailer.with_synched_deliveries do | |||
125 | Redmine::IMAP.check(imap_options, MailHandler.extract_options_from_env(ENV)) |
|
128 | Redmine::IMAP.check(imap_options, MailHandler.extract_options_from_env(ENV)) | |
126 | end |
|
129 | end | |
|
130 | end | |||
127 |
|
131 | |||
128 | desc <<-END_DESC |
|
132 | desc <<-END_DESC | |
129 | Read emails from an POP3 server. |
|
133 | Read emails from an POP3 server. | |
@@ -149,8 +153,10 END_DESC | |||||
149 | :password => ENV['password'], |
|
153 | :password => ENV['password'], | |
150 | :delete_unprocessed => ENV['delete_unprocessed']} |
|
154 | :delete_unprocessed => ENV['delete_unprocessed']} | |
151 |
|
155 | |||
|
156 | Mailer.with_synched_deliveries do | |||
152 | Redmine::POP3.check(pop_options, MailHandler.extract_options_from_env(ENV)) |
|
157 | Redmine::POP3.check(pop_options, MailHandler.extract_options_from_env(ENV)) | |
153 | end |
|
158 | 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" | |
156 | task :test, [:login] => :environment do |task, args| |
|
162 | task :test, [:login] => :environment do |task, args| |
General Comments 0
You need to be logged in to leave comments.
Login now