summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Core/Mail/Transport/Mail.php2
-rw-r--r--app/Helper/MailHelper.php17
-rw-r--r--app/Template/config/application.php3
3 files changed, 21 insertions, 1 deletions
diff --git a/app/Core/Mail/Transport/Mail.php b/app/Core/Mail/Transport/Mail.php
index aff3ee20..d27925f0 100644
--- a/app/Core/Mail/Transport/Mail.php
+++ b/app/Core/Mail/Transport/Mail.php
@@ -32,7 +32,7 @@ class Mail extends Base implements ClientInterface
try {
$message = Swift_Message::newInstance()
->setSubject($subject)
- ->setFrom(array(MAIL_FROM => $author))
+ ->setFrom(array($this->helper->mail->getMailSenderAddress() => $author))
->setBody($html, 'text/html')
->setTo(array($email => $name));
diff --git a/app/Helper/MailHelper.php b/app/Helper/MailHelper.php
index 6c7eeff0..12e7f05f 100644
--- a/app/Helper/MailHelper.php
+++ b/app/Helper/MailHelper.php
@@ -45,4 +45,21 @@ class MailHelper extends Base
return $subject;
}
+
+ /**
+ * Get mail sender address
+ *
+ * @access public
+ * @return string
+ */
+ public function getMailSenderAddress()
+ {
+ $email = $this->configModel->get('mail_sender_address');
+
+ if (!empty($email)) {
+ return $email;
+ }
+
+ return MAIL_FROM;
+ }
}
diff --git a/app/Template/config/application.php b/app/Template/config/application.php
index 0f842f6e..b66d0633 100644
--- a/app/Template/config/application.php
+++ b/app/Template/config/application.php
@@ -9,6 +9,9 @@
<?= $this->form->text('application_url', $values, $errors, array('placeholder="http://example.kanboard.net/"')) ?>
<p class="form-help"><?= t('Example: http://example.kanboard.net/ (used to generate absolute URLs)') ?></p>
+ <?= $this->form->label(t('Email sender address'), 'mail_sender_address') ?>
+ <?= $this->form->text('mail_sender_address', $values, $errors, array('placeholder="'.MAIL_FROM.'"')) ?>
+
<?= $this->form->label(t('Language'), 'application_language') ?>
<?= $this->form->select('application_language', $languages, $values, $errors) ?>