Back to Docs

IMAP Integration

Configure IMAP settings for automated email interactions, such as retrieving 2FA tokens and parsing emails during test execution.

Mechasm supports IMAP integration to facilitate testing scenarios that require email interaction. This is particularly useful for:

  • 2FA/OTP Retrieval: Automatically fetching One-Time Passwords sent via email during sign-up or login flows.

Enabling IMAP Integration

To use these features, you must first enable the integration in your project settings:

  1. Navigate to your Project Settings.
  2. Select the Email tab.
  3. Enter the inbox connection details.
  4. Select Save email settings.
  5. Toggle Enable email integration.
mechasm.ai/dashboard/projects/.../settings/imap
IMAP Integration Settings

Configuration

Configure the inbox directly in the project’s Email tab. Mechasm stores the connection securely for the project.

Connection details

Provide:

  • IMAP host: Your provider’s IMAP hostname, such as imap.gmail.com.
  • Email or username: The account Mechasm should read.
  • Password: The account password or, preferably, an app-specific password.

All three values are required. Update them from the same tab whenever the inbox credentials change.

Using IMAP During Tests

Once setup is complete, you can use IMAP inside your test flows to retrieve verification codes and continue email-based authentication steps.

See Using Emails in Tests.