summaryrefslogtreecommitdiff
path: root/Postman/PostmanOptions.php
diff options
context:
space:
mode:
Diffstat (limited to 'Postman/PostmanOptions.php')
-rw-r--r--Postman/PostmanOptions.php18
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() ) {