Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Test email receiving

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.)
POST/administration/email-accounts/{id}/test-receiving
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstringrequired
Query parameters
fieldsToReturnstring

Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.

responseShapestring

Advanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:compactfull
Header parameters
LT-Response-Shapestring

Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:full
Responses
200

Successfully connected and retrieved email

datestring<date-time>

ISO 8601 timestamp indicating when the most recent email was received.

fromobject

Sender email address(es) of the most recent email. Multiple addresses are comma-separated if present.

messagestringrequired

Human-readable message describing the test result. Includes success confirmation or error details explaining what went wrong.

messageIdstring

Message ID of the most recent email retrieved from the inbox. This is a unique identifier assigned by the email server.

subjectstring

Subject line of the most recent email retrieved from the inbox.

successbooleanrequired

Indicates whether the test was successful. true means the connection was established and an email was retrieved, false means there was an error.

400

Failed to connect or retrieve email

401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

404

Email account not found

Try it
Server
Authorization
Parameters
Request
curl -X POST "https://leadtime.app/api/public/administration/email-accounts/string/test-receiving" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
  "date": "2024-01-20T10:30:00Z",
  "from": "sender@example.com",
  "message": "Successfully connected and retrieved latest email",
  "messageId": "<abc123@example.com>",
  "subject": "Test Email Subject",
  "success": true
}