Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-28 12:46:09 +01:00

Merge branch 'develop' into title-ui-fix

This commit is contained in:
Thomas Boerger 2016-11-03 09:09:00 +01:00 committed by GitHub
commit bc7e92a2b5
6 changed files with 15 additions and 5 deletions

View file

@ -35,7 +35,7 @@ github.com/nfnt/resize = commit:891127d
github.com/russross/blackfriday = commit:93622da
github.com/satori/go.uuid = commit:0aa62d5
github.com/sergi/go-diff = commit:ec7fdbb
github.com/strk/go-libravatar = commit:5eed7bf
strk.kbt.io/projects/go/libravatar = commit:5eed7bf
github.com/shurcooL/sanitized_anchor_name = commit:10ef21a
github.com/Unknwon/cae = commit:7f5e046
github.com/Unknwon/com = commit:28b053d

1
.lgtm Normal file
View file

@ -0,0 +1 @@
self_approval_off = false

2
glide.lock generated
View file

@ -81,7 +81,7 @@ imports:
version: ec7fdbb58eb3e300c8595ad5ac74a5aa50019cc7
subpackages:
- diffmatchpatch
- name: github.com/strk/go-libravatar
- name: strk.kbt.io/projects/go/libravatar
version: 5eed7bff870ae19ef51c5773dbc8f3e9fcbd0982
- name: github.com/shurcooL/sanitized_anchor_name
version: 10ef21a441db47d8b13ebcc5fd2310f636973c77

View file

@ -40,7 +40,7 @@ import:
- package: github.com/sergi/go-diff
subpackages:
- diffmatchpatch
- package: github.com/strk/go-libravatar
- package: strk.kbt.io/projects/go/libravatar
- package: golang.org/x/crypto
subpackages:
- ssh

View file

@ -160,7 +160,7 @@ func composeIssueMessage(issue *Issue, doer *User, tplName base.TplName, tos []s
if err != nil {
log.Error(3, "HTMLString (%s): %v", tplName, err)
}
msg := mailer.NewMessageFrom(tos, fmt.Sprintf(`"%s" <%s>`, doer.DisplayName(), setting.MailService.User), subject, content)
msg := mailer.NewMessageFrom(tos, fmt.Sprintf(`"%s" <%s>`, doer.DisplayName(), setting.MailService.FromEmail), subject, content)
msg.Info = fmt.Sprintf("Subject: %s, %s", subject, info)
return msg
}

View file

@ -6,6 +6,7 @@ package setting
import (
"fmt"
"net/mail"
"net/url"
"os"
"os/exec"
@ -21,7 +22,7 @@ import (
_ "github.com/go-macaron/cache/redis"
"github.com/go-macaron/session"
_ "github.com/go-macaron/session/redis"
"github.com/strk/go-libravatar"
"strk.kbt.io/projects/go/libravatar"
"gopkg.in/ini.v1"
"github.com/gogits/gogs/modules/bindata"
@ -714,6 +715,7 @@ type Mailer struct {
Name string
Host string
From string
FromEmail string
User, Passwd string
DisableHelo bool
HeloHostname string
@ -749,6 +751,13 @@ func newMailService() {
EnableHTMLAlternative: sec.Key("ENABLE_HTML_ALTERNATIVE").MustBool(),
}
MailService.From = sec.Key("FROM").MustString(MailService.User)
parsed, err := mail.ParseAddress(MailService.From)
if err != nil {
log.Fatal(4, "Invalid mailer.FROM (%s): %v", MailService.From, err)
}
MailService.FromEmail = parsed.Address
log.Info("Mail Service Enabled")
}