import email marks email as read

Hi, email received, after about a minute marks it self as read on our (hosted) exchange server, We disabled the email import task on CRM and this fixed the issue. So when the CRM is importing the email it is marking it as read. This is causing problems as the email box is monitored by serveral people and no one knows if it really has been reads or not.

Is there away that CRM can import the emails but leave the message as not read?

Cheers
Pete

Version 7.10.7
Sugar Version 6.5.25 (Build 344)

This is a relevant question, and I wish I had an answer for it, but Iā€™m afraid there is currently no option to configure this. It might be a limitation of IMAP, or it might not.

i tried having a look at the code (function importOneEmail) but I couldnā€™t find anything obvious about setting emails as ā€œreadā€, maybe itā€™s a side effect of one of the other functions it callsā€¦

Thank you for your reply.

I had thought we had made an work-a-round and it was working for about a day and a half. So using mail rules on the exchange server , any email sent or received with the text ā€˜[CASEā€™ in the subject is copied to a mail folder called CRM. and then I got suiteCRM to monitor just the CRM folder.

This worked, been working for the last day and a half and has successfully imported 65 emails without issue. Then all of a sudden (with no configuration changes, i know, I am the only one with the admin password and not been logged on) the emails in the inbox are being marked as read again.

I have deleted the inbound email account and started again and still it is the same. I selected the ā€˜Noā€™ to leave on server, once the emails are imported it is only deleting from the CRM folder, so it is only reading emails on the inbox, not fully actions the inbound email settings.

Any ideas where i should be checking?
Is there a log i can check?
Any ideas if i can hard code what folder is checked via imap?
what files does the code for imap imports live in?

Any Help would be greatly appreciated.

sorry worked around is working fine, the test server had been started, this was reading the emails!!!

Just in case people are interested, this is fixed at 7.10.8

1 Like

Hi,
I am using 7.10.22 and have problems with emails not being set read.
Emails are imported, cases are created but email stays UNREAD on server (Office365).
This creates problems beacuse CRM is trying to read from IMAP all unread mails ?!

So CRM is reading emails, not putting them as read, and than tries to read them again.

Also does anyone else have problems with opening Email module? I have around 50.000 emails in CRM but Email modules is opening for few minutes.

1 Like

@peted do you know which PR this is, so I can take a look?

@fcorluka you might want to check for slow queries, if the database starts getting too big some parts of the code might be failing.

You can turn on Admin / System settings / Log slow queries and then keep an eye on your logs.

You can also run the first query in this post, you might notice something else

Hi,

I believe this is not correct solution.
There should be an option for ā€˜READ MAILā€™ on groups mails; because not everybody have the same company process. So for me every mail that is imported from mail server should be ā€˜SEENā€™.

As for the slow queries, I have over 100.000 Cases and that is opened under 10sec.

Best regards,
Filip

What did you mean by this sentence? I mentioned slow queries because if a screen takes minutes to render, then eventually you will be interrupted by the PHP timeoutā€¦

Ok, maybe I was little radical; but it is more than 1 minute.
I will try slow query log, but I just wanted to know if someone else has this problem.

Br,
Filip

Ok, the slow queries logging will let you know if the problem is this or not.

Meanwhile we wait if @peted knows which fix was applied earlier.

Checking your web server PHP error log (usually php_errors.log, itā€™s defined in your php.ini) will also tell you if some request failed due to hitting max_execution_time.

Any solution for this.
When i add inbound email, emails are as read on host server :frowning:

(Apologies for bumping a very old post)

Regarding the Emails module being slow to load (over 1min), this issue has been fixed in version 7.12.5

Hereā€™s the link: 7.12.x Releases :: SuiteCRM Documentation

You donā€™t have to upgrade though, the devs provided us with a single MySQL command to manually add the necessary database index:

This release adds a new index to help improve performance in emails, instances with significantly large volume of emails may wish to run ALTER TABLE emails ADD INDEX idx_email_uid (uid); directly on their database prior to the upgrade to help avoid a potential timeout / long upgrade.

This has helped me on my 7.11.19 installation with over 60k imported emails.