Skip to content

boolean_smtp_oauth_refresh_success

Fires after an OAuth token refresh succeeds.

action Tier A Since 1.0.0

Fired by the scheduled refresh job and by a manual refresh from the admin UI alike, with the same payload.

Signature

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

Parameters

ParameterTypeDescription
$payloadarray<string, mixed>
  connection_idintId of the refreshed connection.
  driverstringNormalized OAuth driver (`google`, `outlook`, `zoho`).
  attemptsintNumber of attempts made.
  response_time_msintTime the token exchange took, in milliseconds.
  token_expires_atint|nullUnix timestamp the new token expires at, null when unknown.
  token_seconds_remainingint|nullSeconds remaining until expiry, null when unknown.

Fires in

Example

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

Next steps