Announcement

Collapse
No announcement yet.

CURL error when connecting to Office 365

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

  • CURL error when connecting to Office 365

    I installed the Outlook Integration extension on ESPO 7.5.1 / php 8.2.10. It seemed to go smoothly and I get the Connect button when adding a personal email account so that leads me to believe it is installed correctly.

    I can't get it to connect for any accounts though. It shows error Error 500 at the top of the screen when I try to connect and the entry in the log file says:

    [2023-09-20 15:48:22] ERROR: (0) Curl failure.; POST /OutlookMail/action/connect; line: 349, file: C:\inetpub\wwwroot\espo.masterpromotions.ca\applic ation\Espo\Core\ExternalAccount\OAuth2\Client.php

    No error number in the log so I'm not sure what to look up. I've been googling this for days and saw one other post on here from 2020 where they said they fixed it and it was related to SSL in CURL but didn't give any more details.

    Has anyone dealt with this error and have any ideas on how to resolve this?

    Thanks in advance!

  • #2
    Hi MikeCarpenter,

    Could you show us the settings of your email account in EspoCRM? IMAP, SMTP?

    Comment


    • #3
      SMTP is working ok because it doesn't need the Extension to do SMTP. I've attached the IMAP settings though. Hitting the "Test Connection" button on the IMAP settings page returns "ERROR 0" at the top of the screen but I want to say that's because it's not Connected yet using the Extension. Click image for larger version

Name:	IMAP.jpg
Views:	773
Size:	70.1 KB
ID:	97948

      Comment


      • #4
        Try to change Security TLS to SSL

        Comment


        • #5
          The "Test Connection" comes back faster with an error 500, but the connect button still doesn't work when you try it. (I got the settings from the o365 website so I'm pretty sure that the TLS setting is correct.)

          Comment


          • #6
            MikeCarpenter,

            Please show us the EspoCRM error log when you set SSL Security for IMAP and you are clicking Test Connection button.

            Comment


            • #7
              Thanks for looking in to this for me.

              Here's what the error log shows when clicking "Connect" with the SSL setting in iMap.

              [2023-09-26 16:43:50] ERROR: (0) Curl failure.; POST /OutlookMail/action/connect; line: 349, file: C:\inetpub\wwwroot\espo.masterpromotions.ca\applic ation\Espo\Core\ExternalAccount\OAuth2\Client.php

              After ERROR: it shows a Zero in brackets which I assume is supposed to be an error number of some kind but Zero doesn't tell me anything.

              Comment


              • #8
                and pressing the "Test Connection" button in the log says this:

                [2023-09-26 16:47:08] ERROR: (0) cannot login, user or password wrong; POST /EmailAccount/action/testConnection; line: 243, file: C:\inetpub\wwwroot\espo.masterpromotions.ca\vendor \laminas\laminas-mail\src\Storage\Imap.php

                but I know the info is correct because it is my info, that I've used 100 times to log in to the Web Interface for Office 365.

                This also display a pink box at the top of the screen for a few seconds that says "Error 500" if that tells you anything.

                Comment


                • #9
                  I have same issue - SMTP sending is ok, but IMAP doesn't work - error 500 invalid username or password. And on O365 side i cannot see any sign-in logs.
                  Did you find solution?

                  Comment


                  • #10
                    Office365 doesn't work with basic authentication anymore. You sure you have set it up for Oauth2.0?
                    Learn how to use OAuth authentication with your IMAP, POP, and SMTP applications.

                    Comment


                    • #11
                      Originally posted by jj.payally View Post
                      I have same issue - SMTP sending is ok, but IMAP doesn't work - error 500 invalid username or password. And on O365 side i cannot see any sign-in logs.
                      Did you find solution?
                      No, I haven't looked at it in a while but it's come back up again so I'll be digging in to it.

                      Comment


                      • #12
                        Originally posted by Akemi View Post
                        Office365 doesn't work with basic authentication anymore. You sure you have set it up for Oauth2.0?
                        I'm assuming the Extension is written to use Oauth2.0 by the author. There doesn't appear to be a setting for which type of security to use and I'd think the author would know that office doesn't support basic authentication anymore and update their extension. Especially for the price I paid for it

                        Comment


                        • Akemi
                          Akemi commented
                          Editing a comment
                          Bit late respons but yes on the side of the extension it will be ok but there is also a matter of setting it up on the side of microsoft.
                      Working...
                      X