From 6fb77bf3ceee9d9968171978c1ebfca8401c3bfc Mon Sep 17 00:00:00 2001 From: Glenn Wilkinson Date: Sun, 5 Jun 2022 21:18:32 +0100 Subject: [PATCH] Fixed formatting from Custom Envelope PR #2334 --- mailer/mailer.go | 4 ++-- models/template.go | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mailer/mailer.go b/mailer/mailer.go index e7842362..14e25a8d 100644 --- a/mailer/mailer.go +++ b/mailer/mailer.go @@ -223,9 +223,9 @@ func sendMail(ctx context.Context, dialer Dialer, ms []Mail) { } } log.WithFields(logrus.Fields{ - "smtp_from": smtp_from, + "smtp_from": smtp_from, "envelope_from": message.GetHeader("From")[0], - "email": message.GetHeader("To")[0], + "email": message.GetHeader("To")[0], }).Info("Email sent") m.Success() } diff --git a/models/template.go b/models/template.go index f7e3ac71..acf4c387 100644 --- a/models/template.go +++ b/models/template.go @@ -11,15 +11,15 @@ import ( // Template models hold the attributes for an email template to be sent to targets type Template struct { - Id int64 `json:"id" gorm:"column:id; primary_key:yes"` - UserId int64 `json:"-" gorm:"column:user_id"` - Name string `json:"name"` + Id int64 `json:"id" gorm:"column:id; primary_key:yes"` + UserId int64 `json:"-" gorm:"column:user_id"` + Name string `json:"name"` EnvelopeSender string `json:"envelope_sender"` - Subject string `json:"subject"` - Text string `json:"text"` - HTML string `json:"html" gorm:"column:html"` - ModifiedDate time.Time `json:"modified_date"` - Attachments []Attachment `json:"attachments"` + Subject string `json:"subject"` + Text string `json:"text"` + HTML string `json:"html" gorm:"column:html"` + ModifiedDate time.Time `json:"modified_date"` + Attachments []Attachment `json:"attachments"` } // ErrTemplateNameNotSpecified is thrown when a template name is not specified