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