refactor: add from to mail config
This commit is contained in:
parent
2d571e3484
commit
52f462e03e
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue