Gmail Authentication Error: Receiving or Sending Email in FME Server

Liz Sanderson
Liz Sanderson
  • Updated

Symptom

In FME Server 2019 and newer when you create an IMAP Email Trigger with a gmail account, even though the password is correct and 2-step authentication is turned off when you ‘Validate’ the settings you get the error message:  

Invalid - Invalid Credentials


If you start the Automation and check the Log File, the error message states: 

Failed to connect to email server. Please check IMAP settings, and ensure IMAP is enabled for the email account. Error message: [ALERT] Application-specific password required: https://support.google.com/accounts/answer/185833 (Failure)


A similar error message arises when attempting to validate an Email Action: 

Invalid - Unable to connect to the email server. Ensure account and password are correct. 534-5.7.9 Application-specific password required. 

 
Prior to FME Server 2019, this was set up using Notifications. Check Resources/Logs/Core/Current/Publishers | Subscribers in the imap.log or email.log respectively for similar authentication errors. 

Cause

Gmail may consider FME Server a less secure app, this is most likely to happen if you are using FME Cloud, or you FME Server is installed in a cloud environment, because the location of those data centers does not match the location you usually sign in from. 
 
You may receive a ‘Critical Security Alert' Email:


Viewing your recent security activity there will also be a report of a ‘Suspicious attempt to sign in from a less secure app’.
 

Resolution

Gmail provides an option to generate App Passwords that allow your applications to log into your Gmail account.
Go to Manage your Google Account
Go to Security
If you have not already, you’ll need to enable 2-step Verification
Under Signing in to Google select App Passwords
Create an App for the Device = Other and give it a name e.g. FME Server
Copy the App Password into your FME Server Automation configuration
Confirm you can now validate the email configuration successfully
 
Please note, if you are still unable to validate the email set up you should contact your IT team, it is possible your organization has additional security layers in place. 

 

Alternative Resolution

If you cannot enable 2-Step Verification to create App Passwords you can turn ‘Less Secure App Access’ ON.

    1. Go to Manage your Google Account
    2. Go to Security
    3. Find the Less secure app access section
    4. Select Turn on access 

    Please note this is not recommended, creating an app password is the preferred method. 
     

     

     

    Was this article helpful?

    Comments

    0 comments

    Please sign in to leave a comment.