Only 200 of 4000 emails are downloading

Hi All,

I’m trying to copy my mails from my email client to suiteCRM. I have a large email box, 10983 as I look now, but suiteCRM is hanging at “Downloading 200 of 4000” I need to increase the 4000, I suspect it’s a limit I need to increase somewhere, but the hanging is the biggest problem.

Could you ffer me a bit of advice to complete the transfer.

Thanks

Julian

Hi. What’s your version of SuiteCRM? Please include that in every post, it really helps.

Have you tried increasing in php.ini these values?

memory_limit
max_execution_time

Also, have a look in the logs to see if there are any clues there.

suitecrm.log
php_errors.log

1 Like

Thanks for that it made a partial difference. The server has 8Gb of ram, I increased the memory_limit in the /php.ini to 4096M and the max execution time to 3600.

It now gets to 1600 messages before stopping. I noticed some errors in the suitecrm.log referring to some messages with very long subjet headers. They were old, so I deleted them.

I’m running Version 7.8.17
Sugar Version 6.5.25 (Build 344)

I’ve attached the sugarcmr.log, the suitecrm.log files. I renames and rebooted the server to get a cleaner suutecrm.log file. the suitecrm.log.2 is the original file.

Thanks you for your help and patience.

Julian

You didn’t attach anything… sometimes these forums play tricks with attachments :frowning:

Normally I prefer if you browse the logs yourself, instead of sending the whole thing. Focus on messages labeled ERROR or FATAL, and pay attention to time stamps to get the errors happening at the time you are trying to broken functionality.

Hi, I’ve been away for a while, so sorry for not getting back, Hopefully the filesare attached. It was my fault, the .log extension isn’t allowed. I just added a .txt extension, THe correct order from new to old is suitecrm.log.txt, suitecrm.log.original.txt then suitecrm.log.2.txt

I’ve had a look throught them, and I think the problems are not the volue of emails, but that the subject on some of them are too long to fit in the database.

I don’t now how to fix this, I guess I just need to increade that particular field. Can you guide me a bit on that if I’m right.

Thanks

Julian

Are you a developer?

I think it’s happening here at this line:

https://github.com/salesagility/SuiteCRM/blob/v7.8.18/modules/InboundEmail/InboundEmail.php#L907

You can add a check to see if it’s the subject field, then truncate the value to 255 chars which is what the database allows (table email_cache).

1 Like

Thanks for that, unfortunatley I’m not a developer and wouldn’t havea clue where to start.

If there’s a developer reading this, could you spoon feed me what I need to do? I can’t be the only one out there who’s had or will have this problem

Thanks

Julian

Sigh… this is not going to work, me changing code on your system without testing…

But try changing this line here

https://github.com/salesagility/SuiteCRM/blob/v7.8.18/modules/InboundEmail/InboundEmail.php#L909

to exactly this:


$set .= "{$fieldName} = " . ( (strcmp($fieldName, 'subject') !== 0) ? $value : substr($value, 0, 254));

This will surely fail because of some missing parenthesis or something…

1 Like

Alternativley I could go through 4000 email, and look for the onse with long subject names, I hate you BA, and delete them as they were spam.

Then it’ll import them all, which it did.

But, this is a potential bug. How do I get it looked at to save others the problems I’ve had

Thank’s for your help, it’s much apprechiated and pointed me down the right path.

The problem is that the official Email specification is vague about limits to the subject fields. So if we enforced a limit of 255 it would be good for some people, but incorrect for others.