Documentation

DocumentationConnecting your AccountsConnecting a Gmail or Google Workspace account

Connecting a Gmail or Google Workspace account

Go to Preferences > Accounts, click +, and choose Gmail or G Suite. Your browser opens Google's sign-in page; sign in, allow the permissions Mailspring asks for, and return to the app. Mailspring signs in with Google OAuth, so you never type your Google password into Mailspring and two-factor authentication works without an app password. Your Google Contacts are synced as well and appear when you address a message.

Mailspring needs Gmail's All Mail folder to be available over IMAP. If setup fails right after signing in, see How do I enable the "All Mail" folder? and How do I enable IMAP for Google Apps?.

"This app is blocked" or "Google will soon block apps that don't comply"

Google re-verifies desktop apps that use the Gmail API every year, and there have been periods where new sign-ins were blocked while Mailspring's review was pending. If you see this message:

  1. Update Mailspring to the latest version and try again — the block is usually lifted within a few weeks and doesn't affect accounts that are already connected.
  2. Use an app password meanwhile. Turn on 2-Step Verification for your Google account, create an app password at myaccount.google.com/apppasswords, then add the account in Mailspring with the IMAP / SMTP option: server imap.gmail.com (port 993, SSL / TLS) and smtp.gmail.com (port 587, STARTTLS), with your full address as the username and the app password as the password. Your labels appear as folders, but Gmail-specific features (the label picker, importance markers, archive-by-removing-label) aren't available, so switch back to Gmail or G Suite sign-in once it works again.
  3. Google Workspace: your administrator may need to allow Mailspring explicitly. In the Admin console, go to Security > Access and data control > API controls > Manage third-party app access, choose Configure new app, search for Mailspring, and mark it Trusted.

The account keeps disconnecting or asking me to sign in again

Google issues Mailspring a long-lived token when you sign in. If that token can't be read or refreshed, the account turns red in Preferences > Accounts and you're asked to reconnect. Work through these in order:

  1. Select the account in Preferences > Accounts and click Re-authenticate... to sign in with Google again. If mail still doesn't flow afterwards, click Rebuild Cache... on the same page.
  2. If it happens after every restart on Linux, Mailspring can't keep its encryption key between launches. This is common with the Flatpak and snap builds: run sudo snap connect mailspring:password-manager-service for the snap, or install the .deb / .rpm package instead. See Password Management Error.
  3. Some antivirus and VPN products intercept the connection to Google and break sign-in. Temporarily disable them to confirm, then add an exception for Mailspring.
  4. If you changed your Google password or revoked access at myaccount.google.com/permissions, you'll need to re-authenticate once.

Things Google doesn't allow third-party clients to do

  • Accounts with Advanced Protection enabled can't use Mailspring.
  • Gmail's category tabs (Social, Promotions...) aren't exposed over IMAP.
  • Gmail keeps its own copy of sent mail, so make sure the Sent Mail label has Show in IMAP enabled in Gmail's settings if your Sent folder looks empty.

Can’t find what you’re looking for?

Ask in the Mailspring community — the team and other users are there to help.

Visit the Community