---
search:
  tags:
    - administration
    - POST
seo:
  description: >-
    Tests the account's IMAP configuration by… Reference for the POST
    /administration/email-accounts/{id}/test-receiving endpoint in the Leadtime
    Public API API.
sidebar:
  badge: POST
  label: Test email receiving
title: Test email receiving
type: openapi-operation
---
Tests the account's IMAP configuration by connecting to the email server and retrieving the latest email from the inbox.

**Purpose:**
- Validates IMAP server connection and authentication
- Tests email retrieval functionality
- Helps troubleshoot email receiving issues
- Verifies that the account can access the mailbox

**Process:**
- Connects to the account's IMAP server using configured credentials
- Retrieves the most recent email from the inbox
- Returns email metadata (message ID, subject, sender, date)
- Returns success or failure with error details

**Supported Account Types:**
- Works best with IMAP accounts (full IMAP configuration)
- OAuth accounts (Google, Office365) may have limitations depending on token status

**Response:**
- Success: Returns details of the latest email (message ID, subject, sender, date)
- Failure: Returns error message describing what went wrong (connection issues, authentication failures, no emails found, etc.)

<Operation source="api-reference" id="emailaccountscontroller-testemailreceiving" />
