> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendpost.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom SMTP Event Types

> Understand Custom SMTP (CS) event types and how they map to the sending lifecycle.

Custom SMTP events use the **CS** prefix and specific event type IDs in SendPost, so you can distinguish them from native SendPost and other TPSP events.

***

## Custom SMTP Event Types

| Event Type | ID | Trigger |
| - | - | - |
| CSProcessed | 58 | SendPost accepted the message and queued it for relay to your SMTP server |
| CSSent | 59 | Your MTA returned 2xx on relay (message accepted by your server for delivery) |
| CSDelivered | 60 | Agent reports MTA `status=sent` (delivered to recipient's mail server) |
| CSDeferred | 61 | Agent may send `deferred`; **accepted by API but not stored** (not shown in UI) |
| CSDropped | 62 | Relay to your SMTP failed after all retries; or non-retryable pre-send failure (e.g. no verified return path domain, suppression, validation) |
| CSHardBounced | 63 | Agent `bounced`/`soft_bounced` classified as hard (by SMTP description); or bounce processor (async DSN) |
| CSSoftBounced | 64 | Agent `bounced`/`soft_bounced` classified as soft (by SMTP description); or bounce processor |
| CSOpen | 65 | Recipient loaded the tracking pixel |
| CSClick | 66 | Recipient clicked a tracked link |
| CSSpamReport | 67 | FBL complaint (out of scope for initial release) |
| CSUnsubscribe | 68 | Recipient used the unsubscribe link/header |

***

## Event Flow

> [accordion] CSSent vs CSDelivered
>
> **CSSent** = Your MTA accepted the message from SendPost (synchronous SMTP 2xx response).
> **CSDelivered** = Your MTA successfully delivered to the recipient's mail server (reported by the event agent from your MTA logs).
> This mirrors SendPost's native model: Sent = accepted by sending infrastructure; Delivered = accepted by recipient's mail server.

> [accordion] CSDropped
>
> Emitted when SendPost could not relay to your SMTP server after all retries (connection failure, timeout, or 4xx/5xx from your server). This is a relay failure, not a recipient bounce. CSHardBounced is only from the agent (MTA status=bounced) or the bounce processor (async DSN).

> [accordion] Bounces: Agent vs Bounce Processor
>
> **Agent**: Sends `bounced` or `soft_bounced`; SendPost classifies each to CSHardBounced or CSSoftBounced using the SMTP description (keyword-based). **Bounce processor**: Receives async DSNs to `sp-bounce.{domain}` and emits CSHardBounced or CSSoftBounced when the original message was sent via Custom SMTP.

> [accordion] CSDeferred not in UI
>
> The agent may send `deferred` events. SendPost accepts them but **does not store** deferred events (by design). CSDeferred (61) will not appear in the Events page or analytics.

***

## Event Sources Summary

| Source | Events |
| - | - |
| SendPost queue | CSProcessed |
| Synchronous SMTP response from your MTA | CSSent (2xx), CSDropped (after retries exhausted) |
| Event reporting agent (MTA logs) | CSDelivered, CSHardBounced, CSSoftBounced (deferred accepted but not stored) |
| SendPost tracking | CSOpen, CSClick, CSUnsubscribe |
| Bounce processor | CSHardBounced, CSSoftBounced |

***

## Next Steps

* [Event reporting agent](https://docs.sendpost.io/guides/custom-smtp/event-agent.md) for CSDelivered, CSDeferred, CSHardBounced from your MTA
* [Analytics](https://docs.sendpost.io/guides/custom-smtp/analytics.md) to view event statistics
* [Troubleshooting](https://docs.sendpost.io/guides/custom-smtp/troubleshooting.md) event processing


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.