Announcement

Collapse
No announcement yet.

IMAP not working for Office 365

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • IMAP not working for Office 365

    When attempting to use the IMAP feature for personal and group email accounts, I can use gmail just fine. However, when I attempt to use our company based email on Microsoft's Office 365 product, I receive the following error:

    Error 500: cannot connect to host ; error = fsockopen(): unable to connect to ssl://outlook.office365.com:993 (Connection timed out) (errno = 0 )

    I contacted Microsoft and they said to check with the software provider as I had the configurations correct.

    Any ideas on how to check specifically what's going on?

    Thanks

  • #2
    Hi
    Check if IMAP is enabled in your email account

    Comment


    • #3
      I have everything setup correctly, however it's still not working. I believe this is an Office 365 error and not an Espo issue. I am trying to elevate the support to get above the entry level people who insist it's not them.

      Comment


      • #4
        What web server are you using?

        Comment


        • #5
          I have my own dedicated server running CentOS 6.8 and WHM 58. I thought it was cPanel's firewall that was blocking the specific ports, but it doesn't seem to be that as I tried to pull the imap data into a PC based program without any luck. It sends on SMTP, but something is blocking the incoming IMAP connection. I can connect and retrieve GMAIL just fine, so that's what makes me think it's a Microsoft issue.

          Comment


          • #6
            Do you use the following settings?
            Click image for larger version  Name:	imap.JPG Views:	1 Size:	65.1 KB ID:	25339

            I can tell you this:
            We got self hosted servers and I installed EspoCRM on one of this servers. (We also got Office365.) From one day to another, I changed no setting, did no update, etc., EspoCRM wasn't able to build up a connection to the IMAP & SMTP servers of Office365.. Then I installed an instance of EspoCRM (with the same settings) on a WebHosting Service and it worked immediately.
            Since now I have no clue why it stopped working... (But had exactly the same error as you)
            Last edited by lucakuehne; 12-06-2016, 02:54 PM.

            Comment


            • #7
              That's exactly how I have it setup.



              We even tried changing the IMAP setting to a few other things they have (m.outlook.com for example).

              Nothing seems to work. I do have a group account setup and it's working, but I did a workaround. I have all the mail from the group account forward to a GMAIL account automatically. Then Espo pulls in the Gmail. I can't send out on behalf of the group, but at least I have emails coming in.
              Attached Files

              Comment


              • #8
                That seems to be exactly the same problem as I got.. I'm so curious why this happens.. When I had this problem I deactivated all Firewalls (Hardware, Software, Windows) but it didn't work. I also saw the IMAP packets leaving my firewalld (into the internet)...

                Comment


                • #9
                  I also have disabled any firewalls on the server, with no luck. What gets me is trying to figure out where the problem is... Gmail works fine, Office 365 doesn't. Perhaps it's a different setting on 365's part I need to find.

                  Comment


                  • #10
                    I just tried this with another install of Espo and a different account using office 365. Same problem.

                    Any chance of seeing an integration with exchange? The API is here: https://msdn.microsoft.com/office/of...est-operations

                    Not sure if it's possible. There are a lot of small businesses using office 365 / exchange now.

                    Comment


                    • #11
                      A little more troubleshooting on this issue.

                      I can connect to the account via IMAP using the Outlook PC application. So I now know that it is indeed enabled and working on the account.

                      Looking at some other web posts with this error: unable to connect to ssl://outlook.office365.com:993 (Connection timed out) (errno = 0 ), some people have figured this out, while I have not, lol. Granted, those were for other web based applications.

                      Here is my error log (removed the actual email address):

                      [2016-12-16 17:22:50] Espo.ERROR: API [POST]:/:controller/action/:action, Params:Array ( [controller] => EmailAccount [action] => testConnection ) , InputData: {"host":"outlook.office365.com","port":"993","ssl" :true,"username":"xxx@xxxx.com","password":"****** ******","id":"583cb83b0a4c07e68"} - cannot connect to host ; error = fsockopen(): unable to connect to ssl://132.245.250.146:993 (Unknown error) (errno = 0 ) [] []

                      I can send out emails using SMTP from Espo. So it's just an incoming IMAP issue.

                      Comment


                      • #12
                        I got also contradictory outcomes. Some outcomes told me that the error lies with EspoCRM and some outcomes told me that the error lies with Office365... After some time I gave up searching for the error...

                        Comment


                        • #13
                          Maybe this post is connected to your problem: http://forum.espocrm.com/forum/gener...65-group-email

                          I had a similar issue for outgoing emails and a different port. MS support says all works from their side.

                          Comment


                          • #14
                            Did anyone manage to resolve this? I've tried stunnel, but get a bunch of errors when negotiating with office365

                            Comment


                            • #15
                              I never got it working. I had to setup forwards and use Gmail as an alternative.

                              Comment

                              Working...
                              X