conf: overhaul email settings (#5940)

This commit is contained in:
ᴜɴᴋɴᴡᴏɴ
2020-02-25 00:35:35 +08:00
committed by GitHub
parent 0d6c405ccb
commit 52ffb67b33
21 changed files with 259 additions and 229 deletions

View File

@@ -24,7 +24,7 @@ import (
"gogs.io/gogs/internal/db"
"gogs.io/gogs/internal/db/errors"
"gogs.io/gogs/internal/httplib"
"gogs.io/gogs/internal/mailer"
"gogs.io/gogs/internal/email"
"gogs.io/gogs/internal/template"
)
@@ -199,7 +199,7 @@ func runHookPostReceive(c *cli.Context) error {
// Post-receive hook does more than just gather Git information,
// so we need to setup additional services for email notifications.
conf.NewPostReceiveHookServices()
mailer.NewContext()
email.NewContext()
isWiki := strings.Contains(os.Getenv(db.ENV_REPO_CUSTOM_HOOKS_PATH), ".wiki.git/")