secure_mailing.rb 542 B

12345678910111213141516171819202122232425
  1. class SecureMailing
  2. include ::Mixin::HasBackends
  3. def self.incoming(mail)
  4. active_backends.each do |backend|
  5. "#{backend}::Incoming".constantize.process(mail)
  6. end
  7. end
  8. def self.retry(article)
  9. active_backends.each do |backend|
  10. "#{backend}::Retry".constantize.process(article)
  11. end
  12. end
  13. def self.outgoing(mail, security)
  14. active_backends.each do |backend|
  15. "#{backend}::Outgoing".constantize.process(mail, security)
  16. end
  17. end
  18. def self.active_backends
  19. backends.select(&:active?)
  20. end
  21. end