main.go: load SMTP templates

This commit is contained in:
Adhityaa 2018-06-09 15:20:01 +05:30
parent 5fe785f2fd
commit 0d6c3b5992
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ func main() {
exitIfError(connectDB()) exitIfError(connectDB())
exitIfError(performMigrations()) exitIfError(performMigrations())
exitIfError(smtpConfigure()) exitIfError(smtpConfigure())
exitIfError(smtpTemplatesLoad())
exitIfError(oauthConfigure()) exitIfError(oauthConfigure())
exitIfError(createMarkdownRenderer()) exitIfError(createMarkdownRenderer())
exitIfError(setupSigintCleanup()) exitIfError(setupSigintCleanup())

View File

@ -17,7 +17,7 @@ type headerPlugs struct {
var templates map[string]*template.Template var templates map[string]*template.Template
func loadTemplates() error { func smtpTemplatesLoad() error {
var err error var err error
headerTemplate, err = template.New("header").Parse(`MIME-Version: 1.0 headerTemplate, err = template.New("header").Parse(`MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8 Content-Type: text/html; charset=UTF-8