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:
- Navigate to your Project Settings.
- Select the IMAP Integration tab.
- Toggle the "Enable IMAP Integration" switch.

Configuration
Once enabled, Mechasm requires specific environment variables to connect to your email provider. The settings page will verify if these variables are configured in your project's Env Variables tab.
Required Environment Variables
You must define the following variables:
IMAP_USER: The email address or username for the IMAP account.IMAP_PASSWORD: The password or app-specific password for the account.IMAP_HOST: The IMAP server hostname (e.g.,imap.gmail.com).
The integration status for each variable will be displayed as either Configured or Missing. Ensure all required variables are set to fully utilize email capabilities in your tests.
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.
