PHPMailer Mailer错误:SMTP connect()失败。 SMTP错误:无法进行身份验证

时间:2017-05-11 04:22:08

标签: centos phpmailer

add_filter( 'woocommerce_coupon_get_discount_amount', 'woocommerce_coupon_get_discount_amount', 20, 5 );
function woocommerce_coupon_get_discount_amount( $discount, $discounting_amount, $cart_item, $single, $coupon ) {

    $fake_code = 'fake_code_abcdefghigklmnopqrstuvwxyz'; // used to ignore this filter
    if ( $coupon->get_code() == $fake_code ) return $discount;

    $max_discount = 250; // coupon limit
    $coupon_code = 'XYZ25'; // coupon to check.

    if ( $coupon->get_code() == $coupon_code )  {

        $_coupon = new WC_Coupon( ); // lets create a fake coupon to test our $max_discount.
        $_coupon->set_props( array(
            'discount_type' => 'fix_cart',
            'amount'        => $max_discount,
            'code'          => $fake_code
        ) );

        $_discount = $_coupon->get_discount_amount( $discounting_amount, $cart_item, $single );

        $discount = min( $_discount, $discount );

    }

    return $discount;
}

出于某种原因,这在一天前工作得非常好。现在出于某种原因,它已经不再适用了。以下是我的信息。

2017-05-11 04:12:04	Connection: opening to ssl://webnode.aquatis.host:465, timeout=3, options=array ( ) 2017-05-11 04:12:05	Connection: opened 
2017-05-11 04:12:08	SERVER -> CLIENT: 
2017-05-11 04:12:08	CLIENT -> SERVER: EHLO manager.aquatis.host 
2017-05-11 04:12:11	SERVER -> CLIENT: 
2017-05-11 04:12:11	SMTP ERROR: EHLO command failed: 
2017-05-11 04:12:11	CLIENT -> SERVER: HELO manager.aquatis.host 
2017-05-11 04:12:14	SERVER -> CLIENT: 
2017-05-11 04:12:14	SMTP ERROR: HELO command failed: 
2017-05-11 04:12:14	SMTP Error: Could not authenticate. 
2017-05-11 04:12:14	CLIENT -> SERVER: QUIT 
2017-05-11 04:12:17	SERVER -> CLIENT: 
2017-05-11 04:12:17	SMTP ERROR: QUIT command failed: 
2017-05-11 04:12:17	Connection: closed 
2017-05-11 04:12:17	SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

我已经仔细检查了密码和用户名,它们是有效的。我将它们标记为*,因此不会共享任何个人信息。我正在尝试连接的SMTP服务器是一个最新的cPanel服务器。我的Centos安装也禁用了firewalld。

0 个答案:

没有答案