Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions controllers/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1760,12 +1760,14 @@ func (controller *MainController) RegisterPost(c web.C, r *http.Request) (string
return controller.Register(c, r)
}

err = controller.emailSender.Registration(email, controller.baseURL, remoteIP, token.String())
if err != nil {
session.AddFlash("Unable to send verification email", "registrationError")
log.Errorf("error sending verification email %v", err)
} else {
session.AddFlash("A verification email has been sent to "+email, "registrationSuccess")
if controller.getNetworkName() != "testnet" {
err = controller.emailSender.Registration(email, controller.baseURL, remoteIP, token.String())
if err != nil {
session.AddFlash("Unable to send verification email", "registrationError")
log.Errorf("error sending verification email %v", err)
} else {
session.AddFlash("A verification email has been sent to "+email, "registrationSuccess")
}
}

return controller.Register(c, r)
Expand Down