@@ -6,8 +6,6 @@ import (
|
||||
"nixcn-cms/pkgs/email"
|
||||
"nixcn-cms/pkgs/turnstile"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
@@ -59,13 +57,12 @@ func Magic(c *gin.Context) {
|
||||
return
|
||||
} else {
|
||||
// Send email using resend
|
||||
resend, err := email.NewResendClient()
|
||||
emailClient, err := email.NewSMTPClient()
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
c.JSON(500, gin.H{"status": "invalid email config"})
|
||||
return
|
||||
}
|
||||
resend.Send(
|
||||
emailClient.Send(
|
||||
req.Email,
|
||||
"NixCN CMS Email Verify",
|
||||
"<p>Click the link below to verify your email. This link will expire in 10 minutes.</p><a href="+url.String()+">"+url.String()+"</a>",
|
||||
|
||||
Reference in New Issue
Block a user