backend fix mail recipients
This commit is contained in:
@@ -3,7 +3,6 @@ package services
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"html/template"
|
"html/template"
|
||||||
"os"
|
|
||||||
|
|
||||||
"gopkg.in/gomail.v2"
|
"gopkg.in/gomail.v2"
|
||||||
|
|
||||||
@@ -35,7 +34,7 @@ func (s *EmailService) SendEmail(to string, subject string, body string, bodyTXT
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg.AddAlternative("text/html", body)
|
msg.AddAlternative("text/html", body)
|
||||||
msg.WriteTo(os.Stdout)
|
// msg.WriteTo(os.Stdout)
|
||||||
|
|
||||||
if err := s.dialer.DialAndSend(msg); err != nil {
|
if err := s.dialer.DialAndSend(msg); err != nil {
|
||||||
logger.Error.Printf("Could not send email to %s: %v", to, err)
|
logger.Error.Printf("Could not send email to %s: %v", to, err)
|
||||||
@@ -209,7 +208,7 @@ func (s *EmailService) SendRegistrationNotification(user *models.User) error {
|
|||||||
logger.Error.Print("Couldn't parse password mail")
|
logger.Error.Print("Couldn't parse password mail")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return s.SendEmail(user.Email, subject, htmlBody, plainBody, "")
|
return s.SendEmail(config.Recipients.UserRegistration, subject, htmlBody, plainBody, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *EmailService) RelayContactFormMessage(sender string, name string, message string) error {
|
func (s *EmailService) RelayContactFormMessage(sender string, name string, message string) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user