summaryrefslogtreecommitdiff
path: root/Postman/PostmanOptions.php
diff options
context:
space:
mode:
authoryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2018-04-04 19:17:51 +0000
committeryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2018-04-04 19:17:51 +0000
commit62b95f35576ea9b9178b900f9480fed0466211a2 (patch)
tree746cfdf1c0cdc8408b312870f881ed3684d8d60b /Postman/PostmanOptions.php
parenta83767b57bb15075e775f2336cfd77225b155799 (diff)
downloadPost-SMTP-62b95f35576ea9b9178b900f9480fed0466211a2.zip
notification & new gmail client
Diffstat (limited to 'Postman/PostmanOptions.php')
-rw-r--r--Postman/PostmanOptions.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/Postman/PostmanOptions.php b/Postman/PostmanOptions.php
index 8b318ef..193f8c9 100644
--- a/Postman/PostmanOptions.php
+++ b/Postman/PostmanOptions.php
@@ -104,6 +104,10 @@ if ( ! class_exists( 'PostmanOptions' ) ) {
const TRANSCRIPT_SIZE = 'transcript_size';
const TEMPORARY_DIRECTORY = 'tmp_dir';
const DISABLE_EMAIL_VALIDAITON = 'disable_email_validation';
+ const NOTIFICATION_SERVICE = 'notification_service';
+ const PUSHOVER_USER = 'pushover_user';
+ const PUSHOVER_TOKEN = 'pushover_token';
+ const SLACK_TOKEN = 'slack_token';
// defaults
const DEFAULT_TRANSCRIPT_SIZE = 128;
@@ -112,6 +116,7 @@ if ( ! class_exists( 'PostmanOptions' ) ) {
const DEFAULT_MAIL_LOG_ENABLED = self::MAIL_LOG_ENABLED_OPTION_YES;
const DEFAULT_MAIL_LOG_ENTRIES = 250;
const DEFAULT_LOG_LEVEL = PostmanLogger::ERROR_INT;
+ const DEFAULT_NOTIFICATION_SERVICE = 'default';
const DEFAULT_TRANSPORT_TYPE = 'smtp'; // must match what's in PostmanSmtpModuleTransport
const DEFAULT_TCP_READ_TIMEOUT = 60;
const DEFAULT_TCP_CONNECTION_TIMEOUT = 10;
@@ -187,11 +192,21 @@ if ( ! class_exists( 'PostmanOptions' ) ) {
return $this->options [ PostmanOptions::TRANSCRIPT_SIZE ];
} else { return self::DEFAULT_TRANSCRIPT_SIZE; }
}
+
public function getLogLevel() {
if ( isset( $this->options [ PostmanOptions::LOG_LEVEL ] ) ) {
return $this->options [ PostmanOptions::LOG_LEVEL ];
} else { return self::DEFAULT_LOG_LEVEL; }
}
+
+ public function getNotificationService() {
+ if ( isset( $this->options [ PostmanOptions::NOTIFICATION_SERVICE ] ) ) {
+ return $this->options [ PostmanOptions::NOTIFICATION_SERVICE ];
+ } else {
+ return self::DEFAULT_NOTIFICATION_SERVICE;
+ }
+ }
+
public function getForcedToRecipients() {
if ( isset( $this->options [ self::FORCED_TO_RECIPIENTS ] ) ) {
return $this->options [ self::FORCED_TO_RECIPIENTS ]; }
@@ -273,6 +288,25 @@ if ( ! class_exists( 'PostmanOptions' ) ) {
return $this->options [ PostmanOptions::MAILGUN_DOMAIN_NAME ];
}
}
+
+ public function getPushoverUser() {
+ if ( isset( $this->options [ PostmanOptions::PUSHOVER_USER ] ) ) {
+ return base64_decode( $this->options [ PostmanOptions::PUSHOVER_USER ] );
+ }
+ }
+
+ public function getPushoverToken() {
+ if ( isset( $this->options [ PostmanOptions::PUSHOVER_TOKEN ] ) ) {
+ return base64_decode( $this->options [ PostmanOptions::PUSHOVER_TOKEN ] );
+ }
+ }
+
+ public function getSlackToken() {
+ if ( isset( $this->options [ PostmanOptions::SLACK_TOKEN ] ) ) {
+ return base64_decode( $this->options [ PostmanOptions::SLACK_TOKEN ] );
+ }
+ }
+
public function getReplyTo() {
if ( isset( $this->options [ PostmanOptions::REPLY_TO ] ) ) {
return $this->options [ PostmanOptions::REPLY_TO ]; }