Skip to content

boolean_smtp_connection_saved

Fires after a connection has been written to the database, wherever the write came from.

action Tier A Since 1.0.0

Fires for the admin UI, the settings importer, the migration from another plugin, the Pro one-click flows and the OAuth token refresh alike — every path goes through the connection repository. `boolean_smtp_connection_created` and `boolean_smtp_connection_updated` are the admin UI's own events and fire only there. The connection's credentials are encrypted at rest; decrypt `$connection->settings` through the encryptor contract if you need them.

Signature

add_action( 'boolean_smtp_connection_saved', $callback, 10, 2 );

Parameters

ParameterTypeDescription
$connection\BooleanSmtp\Models\ConnectionThe connection as stored.
$createdboolTrue when the row was just created, false when it was updated.

Fires in

Example

boolean_smtp_connection_saved.php
add_action( 'boolean_smtp_connection_saved', function ( \BooleanSmtp\Models\Connection $connection, bool $created ) {
// React to the event.
}, 10, 2 );

Next steps