Skip to content
English
  • There are no suggestions because the search field is empty.

Email Sending Failed : SMTP connect failed ()

What causes the 'SMTP connect failed' error when setting up XOAUTH2 in FileCloud?

The 'Email Sending Failed : SMTP connect failed ()' error occurs when configuring XOAUTH2 SMTP authentication in the FileCloud Admin Portal and is caused by a Microsoft account authentication issue. The fix is to regenerate the oAuth token using a private browser session logged in as the superadmin user, ensuring the correct Microsoft mailbox account is selected during the login prompt.

Original question or issue

Receiving an 'Email Sending Failed : SMTP connect failed ()' error in the Admin Portal while setting up XOAUTH2 for Email.


Environment:

  • Product - FileCloud Server
  • Version - 23.1 and later
  • Platform - Any

Steps to Reproduce:

From the Admin Portal > Settings > Email page:

  • Set 'Email type' as SMTP
  • Set 'SMTP AUTH Type' to XOAUTH2
  • Fill in the required fields using FileCloud's Email Settings support documentation below:

https://docs.filecloud.com/fcdoc/latest/server/filecloud-administrator-guide/filecloud-site-setup/email-settings


Error or Log Message:

Email Sending Failed : SMTP connect failed ()


Defect or Enhancement Number:

 


Cause:

Confirmed as a Microsoft-related issue in this particular scenario


How do you resolve the 'SMTP connect failed' error for XOAUTH2?

  1. Open a private or incognito browser window.
  2. Log into the Admin Portal as the superadmin user, and not an elevated admin user.
    • (NOTE: If the superadmin password was forgotten, it can be reset via the FileCloud Admin Portal login page or by following the password reset procedure in the FileCloud administrator documentation.)
  3. Open Developer Tools in the browser (F12) > Network tab > Record Network Log.
  4. Navigate to Settings > Email and click the Generate oAuth Token button.
  5. In the Microsoft login prompt, verify that the account displayed is the mailbox configured in all FileCloud email fields and the account that Azure has granted SMTP permissions to.
  6. If the wrong Microsoft account appears in the login prompt, sign out of that account in the browser session and sign in with the correct account before proceeding.
  7. Enter the correct credentials and complete the login flow.

How do you collect logs if the issue persists?

  • If the issue persists after completing the steps above, download the associated HAR file from the web browser for further diagnostics.
  • To collect FileCloud Server logs in DEV mode:
    1. In the Admin Portal, navigate to Settings > Server and set Log Level to DEV.
    2. Reproduce the issue.
    3. Navigate to System > Checks and click the Generate Logs button to download the newest logs.
  • The FileCloud Server logs will also be available in these locations:
    • Windows: C:\xampp\htdocs\scratch\logs\log_YYYY-MM-DD.txt
    • Linux: /var/www/html/scratch/logs/log_YYYY-MM-DD.txt
  • Email Settings Support Documentation:

https://docs.filecloud.com/fcdoc/latest/server/filecloud-administrator-guide/filecloud-site-setup/email-settings