Chatwoot/app/jobs/inboxes/fetch_imap_email_inboxes_job.rb
Aswin Dev P.S 24e6a92297
feat: IMAP Email Channel (#3298)
This change allows the user to configure both IMAP and SMTP for an email inbox. IMAP enables the user to see emails in Chatwoot. And user can use SMTP to reply to an email conversation.

Users can use the default settings to send and receive emails for email inboxes if both IMAP and SMTP are disabled.

Fixes #2520
2021-11-19 11:52:27 +05:30

9 lines
267 B
Ruby

class Inboxes::FetchImapEmailInboxesJob < ApplicationJob
queue_as :low
def perform
Inbox.where(channel_type: 'Channel::Email').all.each do |inbox|
Inboxes::FetchImapEmailsJob.perform_later(inbox.channel) if inbox.channel.imap_enabled
end
end
end