2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2020-06-02 11:01:16 +00:00
|
|
|
class SecureMailing
|
|
|
|
include ::Mixin::HasBackends
|
|
|
|
|
|
|
|
def self.incoming(mail)
|
|
|
|
active_backends.each do |backend|
|
|
|
|
"#{backend}::Incoming".constantize.process(mail)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.retry(article)
|
2022-02-16 08:52:18 +00:00
|
|
|
result = []
|
2020-06-02 11:01:16 +00:00
|
|
|
active_backends.each do |backend|
|
2022-02-16 08:52:18 +00:00
|
|
|
result << "#{backend}::Retry".constantize.process(article)
|
2020-06-02 11:01:16 +00:00
|
|
|
end
|
2022-02-16 08:52:18 +00:00
|
|
|
result
|
2020-06-02 11:01:16 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.outgoing(mail, security)
|
|
|
|
active_backends.each do |backend|
|
|
|
|
"#{backend}::Outgoing".constantize.process(mail, security)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.active_backends
|
|
|
|
backends.select(&:active?)
|
|
|
|
end
|
|
|
|
end
|