1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 20:41:57 +00:00

E-mail through linux command with UseCommand configuration field

This commit is contained in:
Makis Maropoulos
2016-06-02 23:29:29 +03:00
parent b58c16113a
commit 679b707751
3 changed files with 9 additions and 4 deletions

View File

@@ -22,3 +22,8 @@ type Mail struct {
func DefaultMail() Mail {
return Mail{}
}
// IsValid returns true if the mail configs are valid
func (m Mail) IsValid() bool {
return (m.Host != "" && m.Port > 0 && m.Username != "" && m.Password != "") || m.UseCommand
}