403Webshell
Server IP : 172.67.158.161  /  Your IP : 18.119.131.235
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/home/giankuin/thietke365.net/wp-content/plugins/mailpoet/lib/Mailer/WordPress/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/giankuin/thietke365.net/wp-content/plugins/mailpoet/lib/Mailer/WordPress/WordpressMailerReplacer.php
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing

namespace MailPoet\Mailer\WordPress;

if (!defined('ABSPATH')) exit;


use MailPoet\Mailer\MailerFactory;
use MailPoet\Mailer\MetaInfo;
use MailPoet\Settings\SettingsController;
use MailPoet\Subscribers\SubscribersRepository;

class WordpressMailerReplacer {

  /** @var MailerFactory */
  private $mailerFactory;

  /** @var MetaInfo */
  private $mailerMetaInfo;

  /** @var SettingsController */
  private $settings;

  /** @var SubscribersRepository */
  private $subscribersRepository;

  public function __construct(
    MailerFactory $mailerFactory,
    MetaInfo $mailerMetaInfo,
    SettingsController $settings,
    SubscribersRepository $subscribersRepository
  ) {
    $this->mailerFactory = $mailerFactory;
    $this->mailerMetaInfo = $mailerMetaInfo;
    $this->settings = $settings;
    $this->subscribersRepository = $subscribersRepository;
  }

  public function replaceWordPressMailer() {
    global $phpmailer;
    // This code needs to be wrapped because it has to run in an early stage of plugin initialisation
    // and in some cases on multisite instance it may run before DB migrator and settings table is not ready at that time
    try {
      $sendTransactional = $this->settings->get('send_transactional_emails', false);
    } catch (\Exception $e) {
      $sendTransactional = false;
    }
    if ($sendTransactional) {
      $phpmailer = new WordPressMailer(
        $this->mailerFactory,
        $this->mailerMetaInfo,
        $this->subscribersRepository
      );
    }
    return $phpmailer;
  }
}

Youez - 2016 - github.com/yon3zu
LinuXploit