refactor: add from to mail config

This commit is contained in:
Derrick Hammer 2024-03-15 07:30:39 -04:00
parent 2d571e3484
commit 52f462e03e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 0 deletions

View File

@ -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
}