Project

General

Profile

Unable to fetch only (all) unread emails via POP /IMAP

Added by Ridhi Jain over 8 years ago

Hi,

I was trying to create issues by fetching emails via POP.

Rake command I used is :

rake redmine:email:receive_pop3 RAILS_ENV="production" host=outlook.office365.com port=995 username=asa@domain.com password="asdas" ssl=true allow_override=project,tracker,priority move_on_success=Redmine move_on_failure=Redmine_KO

It is reading all read and unread emails everytime I run this command, everytime issues are created for all the mails. I am trying to achieve to read only unread emails via rake, and mark them as read after successful upload of issue.
IMAP does this by default I guess.

Earlier I was executing following command using IMAP.:

rake redmine:email:receive_imap RAILS_ENV="production" host=outlook.office365.com port=993 username=asa@domain.com password="asdas" ssl=true allow_override=project,tracker,priority move_on_success=Redmine move_on_failure=Redmine_KO

but while using IMAP I had issue that it was only reading one unread mail at a time and was throwing following error:

rake aborted! Net::IMAP::NoResponseError: The destination mailbox could not be found.

It threw this error, but one issue at a time was getting created in Redmine.

Can you please help me to trace out what am I doing wrong? What change can be done in to solve my problem statement,i.e, mails get readed once, correctly to create issue in redmine?
Configurations:
Redmine: 3.1.0
Ruby: 2.0
Rails: 4.2.3

Thank you.