4
Mail Doesn't Refresh - Temp Fix Here
Problem reported by Nicolas Le Merle - 8/22/2017 at 3:59 AM
Submitted
Hey Guys,
 
As I have loads of customers screaming that they are not receiving mail (because in v16 there is a bug where mail is not being refreshed) I have written some JavaScript to relieve some frustration until SmarterTools can come up with a more permanent solution for this.
 
The below code simply replicates a user clicking the deleted items folder and then back to the folder they were in at the time. This naturally reloads all emails in the inbox folder. This function is in a 2 minute loop (120000 milliseconds) - feel free to amend that time as you wish.
 
Simply add the below code right at the end of 'site.js' which is located in C:\Program Files (x86)\SmarterTools\SmarterMail\MRS\Interface\output
setInterval(function(){
	if(document.URL.indexOf("interface/root#/email") >= 0){ 
		console.log('Inbox Refreshed');
		var active = $('ul.nav-list li.active a');
		$('ul.nav-list li:nth-of-type(2) a').trigger('click');
		setTimeout(function() {
			$(active).trigger('click')
		}, 250);}
}, 120000); //set refresh time here in milliseconds
 
Feel free to comment any improvements or if you notice an issues with this approach.
 
Cheers,
Nic

5 Replies

Reply to Thread
0
Matt Petty Replied
Employee Post
We also deployed a potential fix that was affecting someone here at the office. It related to cookies that were being used, which we clear local domain cookies now, since we don't use them anymore. Not sure how many people this would affect but it is another potential fix, so you might wanna try re-evaluating the problem after upgrade.
Matt Petty Senior Software Developer SmarterTools Inc. www.smartertools.com
0
Nicolas Le Merle Replied
Hi Matt,

Iv already tried clearing all cookie data as well as local storage / session data and issue still persists.

It's intermittent tho as it seems to work fine in IE but not in chrome. Can you confirm which exact cookie is potentially causing the issue ?
0
Matt Petty Replied
Employee Post
We aren't sure, we only had one computer in the office that was reproducing the issue and it wasn't until after the cookies were cleared did we notice that it fixed the issue that laptop was having.
Matt Petty Senior Software Developer SmarterTools Inc. www.smartertools.com
0
Matt Petty Replied
Employee Post
If you want you can inspect the cookies by opening the developer tools in chrome, going to Application, then Cookies.
If you wish, you can send them to me privately (PM on Community) to look through.
Matt Petty Senior Software Developer SmarterTools Inc. www.smartertools.com
0
Nicolas Le Merle Replied
I already deleted all cookie data as well as local storage / session data so have nothing to send. So even after deleting all that data, the issue still occurs for me. I even tested in incognito and new mail still doesn't load. Same applies for deleting mail, it doesn't go away until you refresh the folder.

Reply to Thread