Skip to content

boolean_smtp_google_validate_settings

Filters validation errors for a Google/Gmail connection using a delivery mode not implemented by the free transport.

filter Tier B Since 1.0.0

Fires only when the delivery mode is neither `api` nor `smtp` (a mode registered by an add-on through the `boolean_smtp_google_delivery_modes` filter). Return the validation errors for that mode, keyed by field name.

Signature

add_filter( 'boolean_smtp_google_validate_settings', $callback, 10, 3 );

Parameters

ParameterTypeDescription
$errorsarray<string, string>Validation errors keyed by field name; empty until a listener adds to it.
$modestringThe connection's delivery mode.
$settingsarray<string, mixed>Full connection settings being validated.

Returns array<string, string> — The filtered errors.

Fires in

Example

boolean_smtp_google_validate_settings.php
add_filter( 'boolean_smtp_google_validate_settings', function ( array $errors, string $mode, array $settings ) {
return $errors;
}, 10, 3 );

Next steps