diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2019-05-15 12:14:32 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2019-05-15 12:14:32 +0000 |
commit | 38153c0f3e739f3d89a1a7734fd7d199bf457fab (patch) | |
tree | 28e19f4e091d5182a2c63bc98377e5381b0043ac /Postman/PostmanOptions.php | |
parent | 942aa536210fe204a2d097eb8878c1d690e0547b (diff) | |
download | Post-SMTP-38153c0f3e739f3d89a1a7734fd7d199bf457fab.zip |
= 2.0 - 2019-05-15
* New: Mailer Type - Added an option to send without overwrite the 'wp_mail' function, better compability to WordPress delivery. hopefully will be the default in the future.
* Updated: Sendgrid API was upgraded and rewritten to the new version.
* Fixed: Message-Id header was missing on SMTP
* Fixed: Email logger optimization - better query for large amount of records.
* Fixed: The localization was fixed to match translate.wordpress.org translation system ( Thanks to Niels de Blaauw from Level-Level ).
* Fixed: Code and optimization ( Thanks to Niels de Blaauw from Level-Level ).
Diffstat (limited to 'Postman/PostmanOptions.php')
-rw-r--r-- | Postman/PostmanOptions.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Postman/PostmanOptions.php b/Postman/PostmanOptions.php index af88b18..7d8c2a0 100644 --- a/Postman/PostmanOptions.php +++ b/Postman/PostmanOptions.php @@ -138,6 +138,11 @@ if ( ! class_exists( 'PostmanOptions' ) ) { const DEFAULT_PLUGIN_MESSAGE_SENDER_EMAIL_ENFORCED = false; const DEFAULT_TEMP_DIRECTORY = '/tmp'; + const SMTP_MAILERS = [ + 'phpmailer' => 'PHPMailer', + 'postsmtp' => 'PostSMTP' + ]; + public $is_fallback = false; // options data @@ -569,6 +574,15 @@ if ( ! class_exists( 'PostmanOptions' ) ) { $this->setSenderName( $senderName ); } } + + public function getSmtpMailer() { + if ( empty($this->options [ 'smtp_mailers' ]) ) { + return 'postsmtp'; + } + + return $this->options [ 'smtp_mailers' ]; + } + public function isAuthTypePassword() { return $this->isAuthTypeLogin() || $this->isAuthTypeCrammd5() || $this->isAuthTypePlain(); } @@ -603,7 +617,7 @@ if ( ! class_exists( 'PostmanOptions' ) ) { * @see PostmanOptionsInterface::getSenderEmail() */ public function getSenderName() { - return $this->getMessageNameEmail(); + return $this->getMessageSenderName(); } /** @@ -624,7 +638,7 @@ if ( ! class_exists( 'PostmanOptions' ) ) { /** * - * @param unknown $data + * @param mixed $data */ public function import( $data ) { if ( PostmanPreRequisitesCheck::checkZlibEncode() ) { |