[Documentation](https://groundhogg.io/documentation/) » [Action Hooks](https://groundhogg.io/documentation/#doc-action-hooks)

# groundhogg/email/after_send

Published Wednesday, June 10, 2026 · Last updated Wednesday, June 10, 2026

Fires after an `Email` object has finished its send attempt, whether it succeeded or failed.

```

do_action( 'groundhogg/email/after_send', $email );
```

You will receive the `Email` object.

## Example

```

add_action( 'groundhogg/email/after_send', 'my_extension_record_send' );

/**
 * Record every email send in a custom analytics table.
 *
 * @param \Groundhogg\Email $email
 *
 * @return void
 */
function my_extension_record_send( $email ) {
    $contact = $email->get_contact();

    my_extension_log_send( [
        'email_id'   => $email->get_id(),
        'contact_id' => $contact ? $contact->get_id() : 0,
        'subject'    => $email->get_subject_line(),
        'sent_at'    => current_time( 'mysql' ),
    ] );
}
```
