mirror of
https://codeberg.org/pronounscc/pronouns.cc.git
synced 2025-02-12 23:03:37 +01:00
19 lines
372 B
Go
19 lines
372 B
Go
|
package auth
|
||
|
|
||
|
import (
|
||
|
"codeberg.org/pronounscc/pronouns.cc/backend/log"
|
||
|
"github.com/jordan-wright/email"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func (s *Server) SendEmail(to, title, template string, data map[string]any) {
|
||
|
e := email.NewEmail()
|
||
|
e.From = s.emailAddress
|
||
|
e.To = []string{to}
|
||
|
|
||
|
err := s.emailPool.Send(e, 10*time.Second)
|
||
|
if err != nil {
|
||
|
log.Errorf("sending email: %v", err)
|
||
|
}
|
||
|
}
|