diff --git a/mail/mail.go b/mail/mail.go index 7e2ff95f..c5567bef 100644 --- a/mail/mail.go +++ b/mail/mail.go @@ -14,6 +14,7 @@ type Subscriber interface { Username() string Password() string To() string + Cc() string } type MailSender struct { @@ -39,6 +40,7 @@ func (ms *MailSender) SendSubscriptionMail(rcv Subscriber) error { m.SetHeader("Subject", ms.config.Smtp.Subject) m.SetHeader("From", ms.config.Smtp.From) m.SetHeader("To", rcv.To()) + m.SetHeader("Cc", rcv.Cc()) m.SetHeader("Bcc", ms.config.Smtp.Bcc) err := ms.mailTpl.Execute(&body, rcv) diff --git a/orm/school.go b/orm/school.go index e2d0cb8a..cc99d7b6 100644 --- a/orm/school.go +++ b/orm/school.go @@ -102,6 +102,10 @@ func (model *School) To() string { return model.Email } +func (model *School) Cc() string { + return model.SchoolContactPersonEmail +} + func (model *School) SetCreatorID(id uint) { model.CreatorID = id }