Skip to content

boolean_smtp_simulation_captured

Fires after a message has been captured by Email Simulation Mode instead of being sent.

action Tier A Since 1.0.0

Fired for every captured message, whether it came from `wp_mail()`, the API-mode pipeline or the queue; the payload is the log entry that recorded it.

Signature

add_action( 'boolean_smtp_simulation_captured', $callback, 10, 1 );

Parameters

ParameterTypeDescription
$payloadarray<string, mixed>
  idintId of the email log entry.
  tostringRecipient address(es), comma separated.
  from_emailstringSender address.
  from_namestringSender name.
  subjectstringSubject line.
  bodystringMessage body.
  headersarray<string, string>Message headers.
  captured_atstringUTC timestamp (`Y-m-d H:i:s`).

Fires in

Example

boolean_smtp_simulation_captured.php
add_action( 'boolean_smtp_simulation_captured', function ( array $payload ) {
// React to the event.
}, 10, 1 );

Next steps