diff --git a/config/mail.go b/config/mail.go index f5bc4cc..4b74ef8 100644 --- a/config/mail.go +++ b/config/mail.go @@ -11,6 +11,7 @@ type MailConfig struct { AuthType string Username string Password string + From string } func (m MailConfig) Validate() error { @@ -23,5 +24,8 @@ func (m MailConfig) Validate() error { if m.Password == "" { return errors.New("password is required") } + if m.From == "" { + return errors.New("from is required") + } return nil }