Deprecated: class-smtp.php is deprecated since version 5.5.0

Viewed 782

Deprecated: class-smtp.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/SMTP.php instead. The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /var/www/wp-includes/functions.php on line 4963

Here is my code. Can any one help me to solve the issues?

<?php
defined('WYSIJA') or die('Restricted access');

require_once ABSPATH . WPINC . '/class-smtp.php';
class WYSIJA_MySMTP extends SMTP {
  public function StartTLS() {
    stream_context_set_option($this->smtp_conn, "ssl", "verify_peer", false);
    stream_context_set_option($this->smtp_conn, "ssl", "verify_peer_name", false);
    stream_context_set_option($this->smtp_conn, "ssl", "allow_self_signed", true);
    return parent::StartTLS();
  }
}
0 Answers
Related