Skip to content

Commit a944dd0

Browse files
committed
Mail: Disable wp-mail.php when mailserver_url is mail.example.com.
Merges [39772] to the 3.7 branch. git-svn-id: https://develop.svn.wordpress.org/branches/3.7@39784 602fd350-edb4-49c9-b593-d223f7449a82
1 parent d12ec69 commit a944dd0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/wp-mail.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
if ( ! apply_filters( 'enable_post_by_email_configuration', true ) )
1515
wp_die( __( 'This action has been disabled by the administrator.' ) );
1616

17+
$mailserver_url = get_option( 'mailserver_url' );
18+
19+
if ( 'mail.example.com' === $mailserver_url || empty( $mailserver_url ) ) {
20+
wp_die( __( 'This action has been disabled by the administrator.' ), 403 );
21+
}
22+
1723
/** Allow a plugin to do a complete takeover of Post by Email **/
1824
do_action('wp-mail.php');
1925

0 commit comments

Comments
 (0)