Skip to content

Commit b25961f

Browse files
committed
Ensure JMAP mailer is active for test sends even if routing is disabled
1 parent 4907c8a commit b25961f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

includes/class-admin-settings.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,11 @@ public function ajax_test_connection() {
405405
$to = ! empty( $options['from_email'] ) ? $options['from_email'] : get_bloginfo( 'admin_email' );
406406
}
407407

408+
// Ensure JMAP mailer is active for the test send, even if routing is disabled.
409+
if ( ! has_filter( 'pre_wp_mail' ) ) {
410+
new Bulwark_JMAP_Mailer( $options );
411+
}
412+
408413
$mail_error = null;
409414
$error_handler = function( $error ) use ( &$mail_error ) {
410415
$mail_error = $error;

0 commit comments

Comments
 (0)