Title: Error Unexpected token
Last modified: August 21, 2016

---

# Error Unexpected token

 *  Resolved [Kemory Grubb](https://wordpress.org/support/users/w33zy/)
 * (@w33zy)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/error-unexpected-token/)
 * I really want this plugin to work but i am having many problems with it.
 * [Here’s a screencap of my settings](http://imgur.com/GJRnb4G)
 * But these are the errors i am getting
 * Warning: imap_open(): Couldn’t open stream {gmail.com:993/ssl/tls} in C:\wamp\
   www\wp.jgat.dev\wp-content\plugins\mailcwp\mailcwp.php on line 129
 * Warning: imap_listmailbox() expects parameter 1 to be resource, boolean given
   in C:\wamp\www\wp.jgat.dev\wp-content\plugins\mailcwp\mailcwp.php on line 2482
 * Warning: Invalid argument supplied for foreach() in C:\wamp\www\wp.jgat.dev\wp-
   content\plugins\mailcwp\mailcwp.php on line 2487
 * Warning: imap_close() expects parameter 1 to be resource, boolean given in C:\
   wamp\www\wp.jgat.dev\wp-content\plugins\mailcwp\mailcwp.php on line 2505
 * [https://wordpress.org/plugins/mailcwp/](https://wordpress.org/plugins/mailcwp/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Warrick](https://wordpress.org/support/users/wzedi/)
 * (@wzedi)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/error-unexpected-token/#post-4750129)
 * We don’t expect any diffilculty connecting to gmail. We use this plugin with 
   gmail every day so we trust this will resolve the issue.
 * Try with sstart-TLS disabled. That shoild resolve the issue.
 * Be careful with gmail. Too many failed attempts or refreshing too frequently 
   will lock you out. If you continue to have issues please confirm the account 
   hasn’t been disabled.
 *  Thread Starter [Kemory Grubb](https://wordpress.org/support/users/w33zy/)
 * (@w33zy)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/error-unexpected-token/#post-4750132)
 * I just tried with start-TLS disabled, i still get the same error message. Also
   should the host be “gmail.com” or “imap.gmail.com”?
 * My Gmail account is active, it is also connected via MS Outlook 2013
 *  Plugin Author [Warrick](https://wordpress.org/support/users/wzedi/)
 * (@wzedi)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/error-unexpected-token/#post-4750133)
 * Apologies. The host is imap.gmail.com. Should’ve spotted that before. We’ll update
   the FAQ to add that in too.
 *  Thread Starter [Kemory Grubb](https://wordpress.org/support/users/w33zy/)
 * (@w33zy)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/error-unexpected-token/#post-4750137)
 * Thats OK, i really like the functionalities your plugin may bring. So i will 
   test the ish out of it.
 * What about server requirements? php_imap? Any specific Apache modules?
 *  Plugin Author [Warrick](https://wordpress.org/support/users/wzedi/)
 * (@wzedi)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/error-unexpected-token/#post-4750139)
 * So the imap.gmail.com did not resolve your issue?
 * Yes, the plugin uses PHP IMAP. If the IMAP extension is not included in your 
   setup and you go ahead installing it please check the SSL requirements as well.
   In some configurations SSL has to be configured differently.
 * No specific Apache modules are required.
 *  Thread Starter [Kemory Grubb](https://wordpress.org/support/users/w33zy/)
 * (@w33zy)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/error-unexpected-token/#post-4750140)
 * I still get the same error.
 * The plugin throws an error when php imap was missing the first time i clicked
   on “Save Changes”. It proceeded after i enabled it.
 * Would it matter if i am using a local WAMP stack? Also because no specific Apache
   module is needed, what about Nginx?
 *  Plugin Author [Warrick](https://wordpress.org/support/users/wzedi/)
 * (@wzedi)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/error-unexpected-token/#post-4750142)
 * If you haven’t already – see the specific PHP imap requirements at [http://au1.php.net/manual/en/imap.requirements.php](http://au1.php.net/manual/en/imap.requirements.php).
 * We are not aware that there are any partciular limitations with WAMP and Nginx
   however we haven’t specifically tested with that configuration. We’ll have to
   do some testing around that to give any specific guidance on configuration however
   we trust the above information will be helpful.
 * Thank you for your feedback at reddit. We’re updating the installation instructions
   and FAQ’s.
 *  Thread Starter [Kemory Grubb](https://wordpress.org/support/users/w33zy/)
 * (@w33zy)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/error-unexpected-token/#post-4750143)
 * I will try a live LAMP install and see how it works.
 *  Plugin Author [Warrick](https://wordpress.org/support/users/wzedi/)
 * (@wzedi)
 * [12 years ago](https://wordpress.org/support/topic/error-unexpected-token/#post-4750314)
 * Closing this issue as it likely relates to environment/configuration issues.
 *  Plugin Author [Warrick](https://wordpress.org/support/users/wzedi/)
 * (@wzedi)
 * [12 years ago](https://wordpress.org/support/topic/error-unexpected-token/#post-4750315)
 * Issue closed as it relates to environment/configuration issues.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Error Unexpected token’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/mailcwp_bab9b4.svg)
 * [MailCWP](https://wordpress.org/plugins/mailcwp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailcwp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailcwp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailcwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailcwp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailcwp/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [Warrick](https://wordpress.org/support/users/wzedi/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/error-unexpected-token/#post-4750315)
 * Status: resolved