Email Sending Failed : SMTP connect failed ()
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
- 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
Resolution or Workaround:
- Open up a private/incognito browser
- 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)
- Open up Dev Tools in the Web Browser (F12) > Network Tab > Record Network Log
- Navigate to Settings > Email and press the 'Generate oAuth Token' button
- Check which Microsoft Account the login prompt displays (this should be the mailbox configured for all FileCloud email fields and the one Azure granted SMTP permissions to)
- If the wrong Account is displaying in the log-in prompt, it can be changed before moving forward
- Ensure the correct credentials are being used
Notes:
- The associated HAR file can be downloaded from the web browser if all else fails after running through the workflow
- FileCloud Server Logs in DEV mode can also be generated by first visiting the Admin Portal > Settings > Server page, and setting the 'Log Level' to DEV
- Reproduce the issue
- Then to download the newest logs, from the Admin Portal you can navigate to System > Checks > 'Generate Logs' button
- 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