Use Google Gmail to send and receive emails in Mojo

Mojo Helpdesk can retrieve emails from a Gmail mailbox and create tickets automatically. It uses IMAP to receive emails and SMTP to send them.

Prerequisites

  • A Gmail account with a custom domain (e.g. support@yourcompany.com)
  • Two-factor authentication (2FA) enabled on the Google account

Step 1: Enable Two-Factor Authentication (2FA)

  1. Go to https://myaccount.google.com/
  2. Select Security in the left navigation.
  3. Scroll down to how you sign in to Google and select turn on 2-step verification.
  4. Follow the on-screen steps: Google will guide you through setting up a second verification step, such as:
    1. Google prompts: Tap “Yes” on a push notification sent to your phone.
      1. Verification codes: Receive a code via SMS or call.
      2. Authenticator app: Use Google Authenticator for one-time codes.
      3. Backup codes: Generate backup codes in case you lose access to your primary method.
  5. Once completed, 2FA will be enabled.

Step 2: Generate an App Password

An app password is a 16-character code that allows Mojo to access Gmail securely without using your main account password.

  1. Go to https://myaccount.google.com/apppasswords
  2. Verify your identity if prompted.
  3. Under App name, enter Mojo Helpdesk.
  4. Click Create. Copy the 16-character password — it will not be shown again.

Step 3: Configure in Mojo Helpdesk

  1. Go to Admin > Channels > Email > Server configuration.
  2. Select use my own mail server.
  3. Enter the following for incoming mail (IMAP):Username: your Gmail addressPassword: the app password from Step 2IMAP server: imap.gmail.comPort: 993 (SSL)
  4. Enter the following for outgoing mail (SMTP):SMTP server: smtp.gmail.comPort: 587 (TLS)

Mojo will test the setup by sending and retrieving a test email. A confirmation message appears when the connection is successful.

Step 4: Enable IMAP Access

  1. Go to Gmail Settings > See all settings > Forwarding and POP/IMAP.
  2. Ensure "Enable IMAP" is selected.

Step 5: Label and Folder Visibility

  1. Navigate to Settings > See all settings > Labels.
  2. Confirm that the "Show in IMAP" checkbox is selected for important folders, especially “Inbox.”

Step 6: Check IMAP Folder Synchronization

Ensure Gmail's synchronization limits are not restricting messages in IMAP folders.

In Gmail Settings > Forwarding and POP/IMAP, select "Do not limit the number of messages in an IMAP folder (default)."

Step 7: Configure DKIM, SPF, and DMARC for Your Domain

To ensure reliable email delivery and protect your domain from spoofing or unauthorized use, it’s critical to configure DKIM, SPF, and DMARC records. These settings help authenticate emails sent from your domain and prevent them from being flagged as spam.

Follow this step-by-step guide to setting up DKIM, SPF, and DMARC for your domain before using this integration.

After completing the setup:

  • Verify that DKIM signing is enabled for your domain.
  • Confirm that SPF includes the correct servers (e.g., Google’s servers).
  • Ensure DMARC policies are correctly configured to monitor and enforce email authentication.

This step is essential for maintaining the integrity and deliverability of your emails when using Mojo Helpdesk with Gmail.

Troubleshooting

If you encounter an issue, below are the steps to troubleshoot:

  • Connection fails at setup - Confirm the app password was copied correctly and that IMAP is enabled in Gmail settings .
  • Emails not creating tickets - Check that Show in IMAP is enabled for Inbox under Gmail Labels settings.
  • Outgoing emails flagged as spam - Verify that DKIM, SPF, and DMARC are configured correctly for your domain.