Adjust POP3 error checks in wp-mail.php. props solarissmoke, fixes #13163.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4deb7b8b48
commit
1d8718e03d
15
wp-mail.php
15
wp-mail.php
|
@ -35,13 +35,18 @@ $time_difference = get_option('gmt_offset') * 3600;
|
|||
$phone_delim = '::';
|
||||
|
||||
$pop3 = new POP3();
|
||||
$count = 0;
|
||||
|
||||
if ( ! $pop3->connect(get_option('mailserver_url'), get_option('mailserver_port') ) ||
|
||||
! $pop3->user(get_option('mailserver_login')) ||
|
||||
( ! $count = $pop3->pass(get_option('mailserver_pass')) ) ) {
|
||||
if ( !$pop3->connect( get_option('mailserver_url'), get_option('mailserver_port') ) || !$pop3->user( get_option('mailserver_login') ) )
|
||||
wp_die( esc_html( $pop3->ERROR ) );
|
||||
|
||||
$count = $pop3->pass( get_option('mailserver_pass') );
|
||||
|
||||
if( false === $count )
|
||||
wp_die( esc_html( $pop3->ERROR ) );
|
||||
|
||||
if( 0 === $count ) {
|
||||
$pop3->quit();
|
||||
wp_die( ( 0 === $count ) ? __('There doesn’t seem to be any new mail.') : esc_html($pop3->ERROR) );
|
||||
wp_die( __('There doesn’t seem to be any new mail.') );
|
||||
}
|
||||
|
||||
for ( $i = 1; $i <= $count; $i++ ) {
|
||||
|
|
Loading…
Reference in New Issue