WordPress每7分钟向我的收件箱发送一次“传递状态通知失败”



我们收到来自 wordpress@domain.com jaqqscigs@gmail.com 的垃圾邮件。我尝试了 MU 插头(Wordpress 和 wamp 每 7 分钟向我的收件箱发送一次"交付状态通知失败"),但我得到了解析错误。有没有办法一起禁用从wordpress发送的邮件?我们已经更改了密码,禁用了密码等。

谢谢!

崔维斯

试试这个(未经测试)。根据您的使用情况,您可能不想抛出 phpmailerException....

class fakemailer {
    public function Send() {
        throw new phpmailerException( 'Cancelling mail' );
    }
}
if ( ! class_exists( 'phpmailerException' ) ) :
class phpmailerException extends Exception {
    public function errorMessage() {
        $errorMsg = '<strong>' . $this->getMessage() . "</strong><br />n";
        return $errorMsg;
    }
}
add_action( 'phpmailer_init', 'wpse_53612_fakemailer' );
function wpse_53612_fakemailer( $phpmailer ) {
    if ( ! /* condition */ ) 
        $phpmailer = new fakemailer();
}

https://wordpress.stackexchange.com/questions/53612/how-to-stop-the-wp-mail-function

最新更新