smtp/server.go
func NewSMTP(filename string, environment string) (s *SMTP, err error) {
	conf, err := GetSMTP(filename, environment)
	if err != nil {
		return
	}
	auth := smtp.PlainAuth("", conf.Auth.User, conf.Auth.Password, conf.Host)
	f := smtp.SendMail
	if conf.SSL {
		f = SendMailSSL
	}
	s = &SMTP{auth: auth, send: f, addr: fmt.Sprintf("%s:%d", conf.Host, conf.Port)}
	return
}
func NewSMTP(filename string, environment string) (s *SMTP, err error) {
	conf, err := GetSMTP(filename, environment)
	if err != nil {
		return
	}
	auth := smtp.PlainAuth("", conf.Auth.User, conf.Auth.Password, conf.Host)
	f := smtp.SendMail
	if conf.SSL {
		f = SendMailSSL
	}
	s = &SMTP{auth: auth, send: f, addr: fmt.Sprintf("%s:%d", conf.Host, conf.Port)}
	return
}
//NewSMTP create new SMTP