mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 13:35:50 +01:00
(refs #99) Improved to configure the FROM field of the email.
This commit is contained in:
@@ -77,7 +77,12 @@ class Mailer(private val smtp: Smtp) extends Notifier {
|
||||
smtp.ssl.foreach { ssl =>
|
||||
email.setSSLOnConnect(ssl)
|
||||
}
|
||||
email.setFrom("notifications@gitbucket.com", context.loginAccount.get.userName)
|
||||
smtp.fromAddress
|
||||
.map (_ -> smtp.fromName.orNull)
|
||||
.orElse (Some("notifications@gitbucket.com" -> context.loginAccount.get.userName))
|
||||
.foreach { case (address, name) =>
|
||||
email.setFrom(address, name)
|
||||
}
|
||||
email.setHtmlMsg(msg(view.Markdown.toHtml(content, r, false, true)))
|
||||
|
||||
// TODO Can we use the Database Session in other than Transaction Filter?
|
||||
|
||||
Reference in New Issue
Block a user