// send authenticates against the smtp server, builds an email and sends it
// to the address provided.
send authenticates against the smtp server, builds an email and sends it
to the address provided.
// send authenticates against the smtp server builds an email and sends it // to the address provided .
func (m *Manager) send(_ context.Context, eml, subj, data string) {
	e := email.NewEmail()
	e.From = m.from
	e.To = []string{eml}
	e.Subject = subj
	e.HTML = []byte(data)
	err := e.Send(m.host, smtp.PlainAuth("", m.username, m.password, m.host))
	if err != nil {
		logutil.Critical(m.log, err).Msg("cannot send an email")
	}
}
func ( m * Manager ) send ( _ context . Context , eml , subj , data string ) { e := email . NewEmail ( ) e . From = m . from e . To = [ ] string { eml } e . Subject = subj e . HTML = [ ] byte ( data ) err := e . Send ( m . host , smtp . PlainAuth ( " " , m . username , m . password , m . host ) ) if err != nil { logutil . Critical ( m . log , err ) . Msg ( " " ) } }
send authenticates against the smtp server, builds an email and sends it
to the address provided.
send authenticates against the smtp server builds an email and sends it to the address provided .