Example #1
0
// NewSMTPTransporter ...
func NewSMTPTransporter(host string, username string, password string, port int) *SMTPTransporter {
	return &SMTPTransporter{
		m: gomail.NewMailer(host, username, password, port),
	}
}
Example #2
0
func InitGomail() *gomail.Mailer {
	mailer := gomail.NewMailer(config.EmailHost, config.EmailUsername, config.EmailPassword, config.EmailPort)
	return mailer
}