Error when creating a folder in a webmail
Problem reported by SEIT - 7/16/2026 at 6:17 AM
Resolved
Hello Everyone, 

I've been encountering this error in the webmail when i try to create a new folder. 

"Cannot read properties of undefined (reading 'length')" 

How do I solve that? Happens to be only on a specific email address and not server-wide or domain wide.
Linda Pagillo Replied
Hey SEIT. I grabbed this from Google. Perhaps it may help...

The "Cannot read properties of undefined (reading 'length')" error in SmarterMail typically occurs when the web interface attempts to evaluate a variable or array that hasn't loaded or returned any data yet (a standard JavaScript issue).
Here is how to isolate and resolve it:
Clear your Browser Cache: Corrupted temporary files in your web browser often cause interface rendering errors in SmarterMail.

Use a Different Browser: Test the interface on Chrome, Firefox, or Edge using an Incognito/Private window. If it works, the issue is strictly local to your browser profile.

Check for Plugin/Extension Interference: Ad-blockers or script-blockers can block core SmarterMail JavaScript files from running, triggering this exact error.

Update SmarterMail: Known scripting and interface bugs are continuously addressed by SmarterTools. Ensure your server administrator has the latest SmarterMail updates installed.

Plesk Integration: If you are managing SmarterMail through Plesk, this error is a known bug associated with domain creation and webspace mapping. It is resolved by ensuring your Plesk SmarterMail components are up to date.
Linda Pagillo
Mail's Best Friend
Email: linda.pagillo@mailsbestfriend.com
Web: www.mailsbestfriend.com
Authorized SmarterTools Reseller
Authorized Message Sniffer Reseller
 
CLEBER SAAD Replied
Hello,

Open a ticket and send more information like the email address and another errors (like F12 - Developer Chrome extension) and get the return of the API (SM it's all API calls)

J. LaDow Replied
The email address in question may have something weird happening in their other folder structure that is preventing SM from reading/parsing the list of folders before or after adding the new one. I mention this because you note it's only happening to one user.

We have seen issues with folders that have leading blank spaces (attempts to keep them positioned at the top) and so forth. 

We had a user that created folders in their Outlook using a leading blank space (or multiples) to organize their folders - which worked, but was very slow to synchronize. We never saw there was a problem until the user tried using their webmail and the folders in question were missing from views. The user wound up having to delete them using Outlook, and recreate with different names before webmail could see them. The data was there in the filesystem on the server, but somewhere the parsing logic couldn't handle the blank spaces in the names and SmarterMail could only "partially" see/work with them.




MailEnable survivor / convert --
Employee Replied
Employee Post Marked As Resolution
We got it fixed.
It ended up being an invalid entry in the user's folders.json file. One of the folder objects contained: "display_name": "" After removing that malformed entry from folders.json, the error disappeared and the user was able to create folders normally again. 
Since the issue only affected a single mailbox, it appears the folder structure for that user had become corrupted, which prevented SmarterMail from properly parsing the folder list. If anyone else runs into the same "Cannot read properties of undefined (reading 'length')" error for only one user, it may be worth inspecting that user's folders.json for any malformed or empty folder entries.

J. LaDow Replied
So basically, exactly as I had described - it was a folder issue.
MailEnable survivor / convert --
Employee Replied
Employee Post
You were spot on J.LaDow.

Reply to Thread

Enter the verification text