diff --git a/wp-mail.php b/wp-mail.php index aab91837832e..f1a12c5761fa 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -14,6 +14,12 @@ if ( ! apply_filters( 'enable_post_by_email_configuration', true ) ) wp_die( __( 'This action has been disabled by the administrator.' ) ); +$mailserver_url = get_option( 'mailserver_url' ); + +if ( 'mail.example.com' === $mailserver_url || empty( $mailserver_url ) ) { + wp_die( __( 'This action has been disabled by the administrator.' ), 403 ); +} + /** Allow a plugin to do a complete takeover of Post by Email **/ do_action('wp-mail.php');