diff options
author | Yehuda Hassine <yehuda@myinbox.in> | 2019-05-01 00:25:40 +0300 |
---|---|---|
committer | Yehuda Hassine <yehuda@myinbox.in> | 2019-05-01 00:25:40 +0300 |
commit | 34356f6d27e564c0d0b687e6cb384e31219222b0 (patch) | |
tree | 31cc7bd49e881cc037eca7e2b877e9e9d3a4689f /Postman/Postman-Mail/PostmanSmtpModuleTransport.php | |
parent | ee4e4461dc0c1ffffc00fbde9698dd379153aa8f (diff) | |
download | Post-SMTP-34356f6d27e564c0d0b687e6cb384e31219222b0.zip |
smtp mailer + bugs
Diffstat (limited to 'Postman/Postman-Mail/PostmanSmtpModuleTransport.php')
-rw-r--r-- | Postman/Postman-Mail/PostmanSmtpModuleTransport.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Postman/Postman-Mail/PostmanSmtpModuleTransport.php b/Postman/Postman-Mail/PostmanSmtpModuleTransport.php index 08e833f..b0fb2c3 100644 --- a/Postman/Postman-Mail/PostmanSmtpModuleTransport.php +++ b/Postman/Postman-Mail/PostmanSmtpModuleTransport.php @@ -327,6 +327,11 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl 'printSmtpSectionInfo', ), PostmanAdminController::SMTP_OPTIONS ); + add_settings_field( 'smtp_mailers', __( 'If you have any issues with the default, select PHPMailer', 'post-smtp' ), array( + $this, + 'smtp_mailer_callback', + ), PostmanAdminController::SMTP_OPTIONS, PostmanAdminController::SMTP_SECTION ); + add_settings_field( PostmanOptions::HOSTNAME, __( 'Outgoing Mail Server Hostname', 'post-smtp' ), array( $this, 'hostname_callback', @@ -401,6 +406,19 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl print __( 'Configure the communication with the mail server.', 'post-smtp' ); } + /** + * Get the settings option array and print one of its values + */ + public function smtp_mailer_callback() { + $smtp_mailers = PostmanOptions::SMTP_MAILERS; + $current_smtp_mailer = $this->options->getSmtpMailer(); + printf( '<select id="input_%2$s" class="input_%2$s" name="%1$s[%2$s]">', PostmanOptions::POSTMAN_OPTIONS, 'smtp_mailers' ); + foreach ( $smtp_mailers as $key => $smtp_mailer ) { + printf( '<option class="input_tx_type_%1$s" value="%1$s" %3$s>%2$s</option>', $key, $smtp_mailer, $current_smtp_mailer == $key ? 'selected="selected"' : '' ); + } + print '</select>'; + } + /** * Get the settings option array and print one of its values */ |