<?php namespace WPMailSMTP; use phpmailerException; // Load PHPMailer class, so we can subclass it. if ( ! class_exists( 'PHPMailer', false ) ) { require_once ABSPATH . WPINC . '/class-phpmailer.php'; } /** * Class MailCatcher replaces the \PHPMailer and modifies the email sending logic. * Thus, we can use other mailers API to do what we need, or stop emails completely. * * @since 1.0.0 */ class MailCatcher extends \PHPMailer implements MailCatcherInterface { use MailCatcherTrait; /** * Callback Action function name. * * The function that handles the result of the send email action. * It is called out by send() for each email sent. * * @since 1.3.0 * * @var string */ public $action_function = '\WPMailSMTP\Processor::send_callback'; /** * Returns all custom headers. * In older versions of \PHPMailer class this method didn't exist. * As we support WordPress 3.6+ - we need to make sure this method is always present. * * @since 1.5.0 * * @return array */ public function getCustomHeaders() { return $this->CustomHeader; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase } /** * Get the PHPMailer line ending. * * @since 2.2.0 * * @return string */ public function get_line_ending() { return $this->LE; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase } /** * Throw PHPMailer exception. * * @since 4.0.0 * * @param string $error Error message. * * @throws phpmailerException PHPMailer exception. */ protected function throw_exception( $error ) { throw new phpmailerException( $error ); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Admin | Folder | 0755 |
|
|
Compatibility | Folder | 0755 |
|
|
Helpers | Folder | 0755 |
|
|
Providers | Folder | 0755 |
|
|
Queue | Folder | 0755 |
|
|
Reports | Folder | 0755 |
|
|
Tasks | Folder | 0755 |
|
|
UsageTracking | Folder | 0755 |
|
|
AbstractConnection.php | File | 1.09 KB | 0644 |
|
Conflicts.php | File | 14.42 KB | 0644 |
|
Connect.php | File | 9.11 KB | 0644 |
|
Connection.php | File | 964 B | 0644 |
|
ConnectionInterface.php | File | 1.01 KB | 0644 |
|
ConnectionsManager.php | File | 765 B | 0644 |
|
Core.php | File | 33.45 KB | 0644 |
|
DBRepair.php | File | 6.29 KB | 0644 |
|
Debug.php | File | 3.5 KB | 0644 |
|
Geo.php | File | 6.76 KB | 0644 |
|
MailCatcher.php | File | 1.63 KB | 0644 |
|
MailCatcherInterface.php | File | 1.16 KB | 0644 |
|
MailCatcherTrait.php | File | 13.14 KB | 0644 |
|
MailCatcherV6.php | File | 1.47 KB | 0644 |
|
Migration.php | File | 12.11 KB | 0644 |
|
MigrationAbstract.php | File | 3.21 KB | 0644 |
|
Migrations.php | File | 3.59 KB | 0644 |
|
OptimizedEmailSending.php | File | 1.15 KB | 0644 |
|
Options.php | File | 43.52 KB | 0644 |
|
Processor.php | File | 14.06 KB | 0644 |
|
SiteHealth.php | File | 12.63 KB | 0644 |
|
Upgrade.php | File | 1.23 KB | 0644 |
|
Uploads.php | File | 5.44 KB | 0644 |
|
WP.php | File | 18.84 KB | 0644 |
|
WPMailArgs.php | File | 4.44 KB | 0644 |
|
WPMailInitiator.php | File | 4.38 KB | 0644 |
|