Test email sending
Sends a test email to verify that the account’s SMTP configuration is working correctly.
Purpose:
- Validates SMTP server connection and authentication
- Tests email delivery functionality
- Helps troubleshoot email sending issues
Process:
- Connects to the account’s SMTP server using configured credentials
- Sends a test email to the specified recipient address
- Returns success or failure with error details
Supported Account Types:
- Works best with IMAP accounts (full SMTP configuration)
- OAuth accounts (Google, Office365) may have limitations depending on token status
Request:
- Provide the email address where the test email should be sent
Response:
- Success: Confirms email was sent successfully
- Failure: Returns error message describing what went wrong (connection issues, authentication failures, etc.)
POST
/administration/email-accounts/{id}/test-sendingAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredQuery parameters
fieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced 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:
compactfullHeader parameters
LT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
fullRequest body
requiredapplication/jsontestEmailAddressstringrequiredEmail address where the test email should be sent. This should be a valid email address that you can access to verify the test email was received.
Responses
200Test email sent successfully
messagestringrequiredHuman-readable message describing the test result. Includes success confirmation or error details explaining what went wrong.
successbooleanrequiredIndicates whether the test email was sent successfully. `true` means the email was sent, `false` means there was an error.
400Failed to send test email
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Email account not found
Request
curl -X POST "https://leadtime.app/api/public/administration/email-accounts/string/test-sending" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"testEmailAddress": "test@example.com"
}'const response = await fetch("https://leadtime.app/api/public/administration/email-accounts/string/test-sending", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"testEmailAddress": "test@example.com"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/administration/email-accounts/string/test-sending",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"testEmailAddress": "test@example.com"
},
)Response
{
"message": "Test email sent successfully",
"success": true
}Failed to send test email
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions
Email account not found