Can't connect incoming email

I have recently switch my email account to office 365 using my domain email. I had no problems connecting my email using my own domain but after changing over to office /outlook 365 I am unable to connect. the imap server is using ssl (port 993) and I receive the below errors:

error log:

[25-Apr-2018 09:59:42 UTC] PHP Warning:  Error while sending QUERY packet. PID=284686 in /home/myusername/public_html/suitecrm/include/database/MysqliManager.php on line 136
[25-Apr-2018 09:59:42 UTC] PHP Stack trace:
[25-Apr-2018 09:59:42 UTC] PHP   1. {main}() /home/myusername/public_html/suitecrm/index.php:0
[25-Apr-2018 09:59:42 UTC] PHP   2. SugarApplication->execute() /home/myusername/public_html/suitecrm/index.php:52
[25-Apr-2018 09:59:42 UTC] PHP   3. SugarApplication->loadUser() /home/myusername/public_html/suitecrm/include/MVC/SugarApplication.php:97
[25-Apr-2018 09:59:42 UTC] PHP   4. AuthenticationController->sessionAuthenticate() /home/myusername/public_html/suitecrm/include/MVC/SugarApplication.php:159
[25-Apr-2018 09:59:42 UTC] PHP   5. SugarAuthenticate->sessionAuthenticate() /home/myusername/public_html/suitecrm/modules/Users/authentication/AuthenticationController.php:202
[25-Apr-2018 09:59:42 UTC] PHP   6. SugarAuthenticate->postSessionAuthenticate() /home/myusername/public_html/suitecrm/modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php:209
[25-Apr-2018 09:59:42 UTC] PHP   7. SugarAuthenticateUser->loadUserOnSession() /home/myusername/public_html/suitecrm/modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php:260
[25-Apr-2018 09:59:42 UTC] PHP   8. User->retrieve() /home/myusername/public_html/suitecrm/modules/Users/authentication/SugarAuthenticate/SugarAuthenticateUser.php:139
[25-Apr-2018 09:59:42 UTC] PHP   9. User->retrieve() /home/myusername/public_html/suitecrm/modules/Users/User.php:768
[25-Apr-2018 09:59:42 UTC] PHP  10. User->retrieve() /home/myusername/public_html/suitecrm/include/SugarObjects/templates/person/Person.php:109
[25-Apr-2018 09:59:42 UTC] PHP  11. MysqliManager->limitQuery() /home/myusername/public_html/suitecrm/data/SugarBean.php:4534
[25-Apr-2018 09:59:42 UTC] PHP  12. MysqliManager->query() /home/myusername/public_html/suitecrm/include/database/MysqlManager.php:281
[25-Apr-2018 09:59:42 UTC] PHP  13. mysqli_query() /home/myusername/public_html/suitecrm/include/database/MysqliManager.php:136
[25-Apr-2018 09:59:42 UTC] PHP Fatal error:  Uncaught Exception: Database failure. Please refer to suitecrm.log for details. in /home/myusername/public_html/suitecrm/include/utils.php:1773
Stack trace:
#0 /home/myusername/public_html/suitecrm/include/database/DBManager.php(353): sugar_die('Database failur...')
#1 /home/myusername/public_html/suitecrm/include/database/DBManager.php(328): DBManager->registerError('Retrieving reco...', 'Retrieving reco...', true)
#2 /home/myusername/public_html/suitecrm/include/database/MysqliManager.php(167): DBManager->checkError('Retrieving reco...', true)
#3 /home/myusername/public_html/suitecrm/include/database/MysqlManager.php(281): MysqliManager->query('SELECT users.* ...', true, 'Retrieving reco...')
#4 /home/myusername/public_html/suitecrm/data/SugarBean.php(4534): MysqlManager->limitQuery('SELECT users.* ...', 0, 1, true, 'Retrieving reco...')
#5 /home/myusername/public_html/suitecrm/include/SugarObjects/templates/person/Person.php(109): SugarBean->retrieve('1', true, true)
#6 /home/myusername/public_html/suitecrm/modules/Users/ in /home/myusername/public_html/suitecrm/include/utils.php on line 1773


Wed Apr 25 09:59:42 2018 [284686][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away

Not sure if it matters but I do have an .htaccess script to redirect to https://www. As I said I have not problems connecting to my server even now. My domain is on a shared server.

I’ve searched high and low for answers with no luck. Thank you in advance for any help.

I should have mentioned I’m running Suitecrm 7.10.4 on a Godaddy site with cPanel and PHP version 7.1 using MySQL

Your errors indicate severe problems with your database. Basically it seems you’re crashing MySQL. I would focus on solving this before anything else.

This might have started only when you switched email provider, but maybe it’s just a coincidence, since switching email provider in an application shouldn’t crash your database engine :slight_smile:

You can go through this document, it has MANY possible causes:

I’m confused, because I can still set up my incoming mail to connect to my old sever and view the mail that still resides on that server.

It’s very possible that you have a genuine email issue, there have been several bugs recently.

But my point is that the other problem is so severe that there is no point in troubleshooting anything else until you get that solved. You see, broken SQL queries can ruin any screen in SuiteCRM, all of them. Fix that first, then see if the other problems persist, and then fix those. This is the only sensible approach.

I’ll check thanks

When I add my email using my original server I no longer receive the SAL error and Suitecrm connects to the database with no issues. I also saw in the article you linked to that one cause of the problem could be:

A client application running on a different host does not have the necessary privileges to connect to the MySQL server from that host.

Do you know how to check privileges in offce/Outlook 365?

Is your web server with SuiteCRM running on the same machine as the MySQL server?

If so, what could this client application be? Do you have any other system connecting to your MySQL server?

This seems to be a MySQL server issue, maybe you are better off asking in their forums.

Another approach that sometimes is preferrable is upgrading your stack. Move to a newer version of MySQL, a newer version of PHP, sometimes this magically solves your problems.

Check this before starting: