diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-02-05 11:54:27 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-02-05 11:54:27 -0500 |
commit | d0a1ed9227a5166aa56d37ccea142cdb1e0ae082 (patch) | |
tree | ccdf94fcd4befcf167a4f7b6fd62d0cb7f3bc5b4 /app/Helper | |
parent | a2e2ab8997cc57042aadbd507109acdbe0475c2d (diff) |
Add configuration parameter to disable email configuration from user interface
Diffstat (limited to 'app/Helper')
-rw-r--r-- | app/Helper/MailHelper.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/app/Helper/MailHelper.php b/app/Helper/MailHelper.php index 3b1c9e41..b42d83ab 100644 --- a/app/Helper/MailHelper.php +++ b/app/Helper/MailHelper.php @@ -54,27 +54,31 @@ class MailHelper extends Base */ public function getMailSenderAddress() { - $email = $this->configModel->get('mail_sender_address'); + if (MAIL_CONFIGURATION) { + $email = $this->configModel->get('mail_sender_address'); - if (!empty($email)) { - return $email; + if (! empty($email)) { + return $email; + } } return MAIL_FROM; } /** - * Get mail sender address + * Get mail transport * * @access public * @return string */ public function getMailTransport() { - $transport = $this->configModel->get('mail_transport'); + if (MAIL_CONFIGURATION) { + $transport = $this->configModel->get('mail_transport'); - if (!empty($transport)) { - return $transport; + if (! empty($transport)) { + return $transport; + } } return MAIL_TRANSPORT; |