Errors¶
Postal-compatible API¶
The API answers HTTP 200 for most errors. The verdict is in the status field:
status | Meaning | Content of data |
|---|---|---|
success | The request was fulfilled. | the result |
error | The request was understood and refused. | code and message |
parameter-error | A required parameter is missing or malformed. | message |
Codes with HTTP 200¶
data.code | Cause | Retry? |
|---|---|---|
AccessDenied | X-Server-API-Key header missing. | No. Send the header. |
InvalidServerAPIKey | The key is not valid. | No. Check the key. |
ServerSuspended | The server is suspended. | No. Contact [email protected]. |
NoRecipients | No recipient in to, cc or bcc (or in rcpt_to). | No. |
TooManyToAddresses | More than 50 addresses in to. | No. Split the send. |
TooManyCCAddresses | More than 50 addresses in cc. | No. |
TooManyBCCAddresses | More than 50 addresses in bcc. | No. |
NoContent | Both plain_body and html_body are missing. | No. |
FromAddressMissing | from is missing. | No. |
UnauthenticatedFromAddress | from is not a valid address, or is not authorized for this server. | No. Check the domain. |
AttachmentMissingName | An attachment has no name. | No. |
AttachmentMissingData | An attachment has no data, or data is not valid base64. | No. |
MessageRejected | Permanent refusal for another reason, described in message (for example, message too large or malformed headers). | No. |
MessageNotFound | On lookup, no message with the given id exists on this server. | No. |
The InvalidServerAPIKey response echoes the key sent
In this error, data.token carries the value received in the header. Do not write this response to logs without removing the field.
Codes with HTTP other than 200¶
| HTTP | data.code | Cause | Retry? |
|---|---|---|---|
| 404 | NotFound | Unknown path under /api/v1/. | No. |
| 405 | MethodNotAllowed | HTTP method not accepted. | No. |
| 413 | RequestTooLarge | The request body exceeds the accepted size. | No. Reduce the attachments. |
| 500 | InternalServerError | Internal failure. | Yes, with increasing waits. |
| 503 | TemporaryFailure | The message could not be accepted right now. | Yes, with increasing waits. |
SES-compatible API¶
| HTTP | SES v2 (x-amzn-ErrorType) | SES v1 (Code) | Cause | Retry? |
|---|---|---|---|---|
| 403 | MissingAuthenticationTokenException | MissingAuthenticationToken | No Authorization header. | No. |
| 403 | IncompleteSignatureException | IncompleteSignature | Malformed signature, missing X-Amz-Date, or host not signed. | No. |
| 403 | UnrecognizedClientException | InvalidClientTokenId | Unknown credential identifier. | No. |
| 403 | InvalidSignatureException | SignatureDoesNotMatch | Wrong signature, service other than ses, or clock more than 15 minutes off. | No. Check the key and the clock. |
| 400 | AccountSuspendedException | AccountSendingPausedException | Server suspended. | No. |
| 400 | BadRequestException | InvalidParameterValue | Invalid request, described in the message. | No. |
| 400 | BadRequestException | InvalidAction | Unsupported operation. | No. |
| 400 | MessageRejected | MessageRejected | Unauthorized sender, more than 50 recipients, or a permanent refusal. | No. |
| 413 | BadRequestException | InvalidParameterValue | Request too large. | No. |
| 503 | ServiceUnavailableException | ServiceUnavailable | Temporary failure. | Yes. |
| 500 | InternalFailure | InternalFailure | Internal failure. | Yes. |
Details in SES compatibility.
SMTP replies¶
Classes¶
| Class | Meaning | What the client should do |
|---|---|---|
2xx | Success. 250 after DATA means the message is queued. | Nothing. |
4xx | Temporary failure. | Try again later. Mail servers do this on their own. |
5xx | Permanent failure. | Do not retry. Fix the cause. |
FrontEngine replies when sending¶
| Reply | Cause | What to do |
|---|---|---|
250 2.0.0 Ok: queued as ... | Message accepted. | Nothing. |
451 4.3.0 | Temporary failure on our side, including during authentication. | Try again. |
451 4.7.1 Sending limit reached, try again later | Sending limit reached for now. | Try again later. |
452 4.3.1 | No room to accept the message right now. | Try again. |
452 4.5.3 | Too many recipients in one transaction (maximum 100). | Send the rest in another transaction. |
454 4.7.0 | Too many failed authentications from your IP. | Fix the credential and wait. |
501 | Command or address with invalid syntax. | Fix the client. |
503 5.5.1 | Commands out of order (for example, DATA before RCPT TO). | Fix the client. |
535 5.7.8 Authentication failed | Wrong credential. | Check the key. |
550 5.6.0 | Malformed headers, or more than one From header. | Fix the message. |
550 5.7.1 Sending limit exceeded | Sending limit exceeded. | Do not retry right away. Contact [email protected]. |
552 5.3.4 | Message over 50 MB, or header block too large. | Reduce the message. |
553 5.7.1 Sender address not permitted for this account | MAIL FROM is not authorized for the credential. | Use a verified domain. |
553 5.7.1 From header address not permitted for this account | From is not authorized for the credential. | Use a verified domain. |
553 5.7.1 Null return path not permitted for a submission | Empty MAIL FROM. | Give a sender. |
554 5.1.3 No deliverable recipients | No valid recipient in the transaction. | Check the addresses. |
A send command without authentication is refused. Authenticate after TLS and before MAIL FROM.
Destination server replies¶
After the 250, delivery to the destination is done by FrontEngine, and the destination server's reply reaches you in the output field of webhooks. Classification into temporary or permanent failure is in Bounces and suppression.