2020-10-17 12:46:09 +02:00
|
|
|
class InMailbox < ApplicationMailbox
|
|
|
|
def process
|
2021-01-22 14:50:56 +01:00
|
|
|
email_importer = EmailImporter.new
|
2020-10-28 23:53:42 +01:00
|
|
|
|
2020-12-31 11:56:13 +01:00
|
|
|
email = email_importer.import(mail)
|
2021-01-22 14:50:56 +01:00
|
|
|
|
2021-02-01 14:02:54 +01:00
|
|
|
processor = FilterProcessor.new
|
|
|
|
email = processor.process_all(Filter.enabled, email)
|
2021-01-22 14:50:56 +01:00
|
|
|
|
2021-01-30 18:22:00 +01:00
|
|
|
# repository = EmailRepository.new
|
|
|
|
# repository.save(email)
|
|
|
|
email.save!
|
2020-10-28 23:53:42 +01:00
|
|
|
end
|
2020-10-17 12:46:09 +02:00
|
|
|
end
|