logging
This commit is contained in:
@@ -46,7 +46,7 @@ func (s *EmailService) SendEmail(to string, subject string, body string, bodyTXT
|
|||||||
|
|
||||||
func ParseTemplate(filename string, data interface{}) (string, error) {
|
func ParseTemplate(filename string, data interface{}) (string, error) {
|
||||||
// Read the email template file
|
// Read the email template file
|
||||||
|
logger.Error.Printf("Data: %#v", data)
|
||||||
templateDir := config.Templates.MailPath
|
templateDir := config.Templates.MailPath
|
||||||
tpl, err := template.ParseFiles(templateDir + "/" + filename)
|
tpl, err := template.ParseFiles(templateDir + "/" + filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -80,6 +80,7 @@ func (s *EmailService) SendVerificationEmail(user *models.User, token *string) e
|
|||||||
UserID: user.ID,
|
UserID: user.ID,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.Error.Printf("USERIID: %#v", user.ID)
|
||||||
subject := constants.MailVerificationSubject
|
subject := constants.MailVerificationSubject
|
||||||
body, err := ParseTemplate("mail_verification.tmpl", data)
|
body, err := ParseTemplate("mail_verification.tmpl", data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user