1. Docs
  2. Administration
  3. Integrations
  4. Email (IMAP/SMTP)

Email (IMAP/SMTP)

The Email integration gives your tests a mailbox. Mail steps read from it over IMAP to wait for a message, pull out a one-time code or a link, and send over SMTP.

3 min read Updated CustomersAdmins

In short

On this page you can

  • Connect a Gmail, Outlook / Office 365, Yahoo or custom IMAP mailbox to the project.
  • Let mail steps wait for an email and extract a one-time code or a link.
  • Send email from a test step through the mailbox’s SMTP server.
  • Test IMAP and SMTP separately and see how many emails the folder holds.
  • Switch the mailbox off without losing its settings.

How to use it

  1. Create a dedicated test mailbox and an app password for it.
  2. Click Setup, choose the Email Provider, enter address and app password.
  3. Click Save & Test and check both IMAP and SMTP succeed.
  4. In Automate, add a mail step such as Extract OTP to a test case.
  5. Use the output, for example {{tc:otp}}, in the next Type step.

What it is for#

Many flows send an email: sign-up confirmation, password reset, two-factor codes. A test cannot finish such a flow without reading that email. The Email integration connects one mailbox to the project, and the mail steps in Automate use it.

CapabilityMail stepWhat it does
OTP ExtractionExtract OTPFinds the newest matching email and stores the code, by default the first six-digit number, in otp.
Link ExtractionExtract LinkStores the first link of the matching email in link.
Wait for MailWait for MailWaits until a matching email arrives, up to the step’s timeout.
Mail Sending (SMTP)Send MailSends an email from the mailbox.
Usage example shown on the page
1. Click "Register"
2. Type email: test@example.com
3. Click "Send Code"
4. [MailExtractOtp]
   → filterSubject: "Verification"
   → outputVariable: otp
5. Type OTP: {{tc:otp}}
6. Click "Verify"

Mail steps only look at unread emails that arrived from 30 seconds before the step started. The step settings (timeout, filters, limits) are described in Automate.

Before you start#

  • A dedicated mailbox for tests, never a person’s mailbox. Tests read and mark its emails.
  • IMAP turned on for that mailbox. Corporate accounts often need IT to allow IMAP.
  • An app password. Your normal password usually does not work.
    • Gmail: turn on two-step verification, then create an app password at Google account › App passwords.
    • Outlook: create an app password in the account’s security settings (Microsoft account › App passwords).
    • Yahoo: create an app password in Yahoo security settings.
    • Custom IMAP: get the server names from your mail admin. IMAP usually uses port 993 (SSL), SMTP 587 (TLS) or 465 (SSL).
  • Network. Mail steps connect from where the test runs. A run on the server cannot reach a mail server that is only inside your network; run those tests on an agent inside it.

Set up the mailbox#

  1. Open the dialog

    Go to IntegrationsEmail (IMAP/SMTP) and click Setup (or Configure Now). The Add Email Integration dialog opens.

  2. Mailbox

    Enter an Integration Name (for example QA Gmail Account), pick the Email Provider: Gmail, Outlook / Office 365, Yahoo Mail or Custom IMAP. Enter the Email Address and the app password.

  3. Server Settings

    For Gmail, Outlook and Yahoo the servers are Auto-filled. For Custom IMAP the section opens: IMAP Server and Port with SSL (for reading mail), SMTP Server and Port with TLS (for sending mail).

  4. Other Settings

    Default Folder (INBOX), Poll Interval (sec) (30), Max Email Count (50) and Active. Defaults suit most tests.

  5. Save & Test

    Click Save & Test. SmartestQA saves, then opens the folder over IMAP and logs in to SMTP.

    “All connections successful”, with “IMAP connection successful (n mail)” and “SMTP connection successful”. Click Save to close.

The Email page#

  • Connection Status: Integration Active, Email Address, Email Provider, IMAP Server, SMTP Server.
  • Test Connection: runs the IMAP and SMTP test again and shows both results.
  • Last test: comes from the last saved test. It is OK when IMAP worked; an IMAP failure shows the error.
  • Capabilities, Usage Example and Supported Action Types:: Mail Extract OTP, Mail Extract Link, Mail Wait For, Mail Send.
  • Setup Guide: short steps for Gmail, Outlook and custom IMAP.

The app password is stored encrypted. When you edit the settings, “Leave blank if you don't want to change it” applies. Integration names must be unique in the project.

For AI assistants#

An assistant connected through MCP reads the test mailbox with smartest_integrations (system mail, actions messages, wait, otp and link), for example to check that a reset email arrived while it writes a test. The mailbox itself is set up only on this page.

If something goes wrong#

Didn’t find your answer?Write to support with your project name and what you see on screen.

info@smartestqa.ai
© 2026 Selenity Technology · SmartestQAsmartestqa.aiThis page as MarkdownChecked against smarttest-fe predev 2a8c79cc (EmailIntegrationPage, EmailConfigModal), smarttest-be 633c2a03 (MailIntegrationController, MailIntegrationService, MailIntegrationSettings), smartestqa-docs research/automate-steps-and-runs.md