Google Apps - Folder names localization

Issue #250 wontfix
Ilias Chasapakis created an issue

Hi,

this is what I was getting while trying to IMAP sync.

php /usr/local/libexec/piler/gmail-imap-import.php
PHP Fatal error:  Uncaught exception 'Zend_Mail_Storage_Exception' with message 'cannot change folder, maybe it does not exist' in /var/www/**MYDOMAIN**/Zend/Mail/Storage/Imap.php:480
Stack trace:
#0 /var/www/MYDOMAIIN/model/google/google.php(60): Zend_Mail_Storage_Imap->selectFolder('[Gmail]/All Mai...')
#1 /usr/local/libexec/piler/gmail-imap-import.php(56): ModelGoogleGoogle->download_users_emails('**MYACCOUNT**@**MYDOMAIN**...', 'ya29.1.AADtN_Vc...')
#2 {main}
  thrown in /var/www/**MYDOMAIN**/Zend/Mail/Storage/Imap.php on line 48

I found that in line number 60 of "/var/www/MYDOMAIN/model/google" the $storage variable value is set to "[Gmail]/All Mail".

So I changed that to the "localized" version "[Gmail]/Tutti i messaggi" for Italy and it now works and it's doing the first synching (going to take a loooong time as there's a whole bunch of messages in there). I don't know if the default folders label is based on domain/browser/app/OS access recognition or user's language settings in the google apps gui.

So I wonder if you could put that as a config parameter in next versions. Also the webgui path has to be set by hand at the moment as I did for google-imap.php otherwise it nags with an error.

Thanks again for your great work, I hope I'll be able to make a donation soon.

Comments (3)

  1. Janos SUTO repo owner

    Can you try it with the latest master branch? It doesn't select a specific imap folder any more, rather it iterates through the folders, so it should find and accept your folder whatever they are called.

  2. Log in to comment