Move SMTP credentials to .env file
This commit is contained in:
@ -16,6 +16,7 @@ import (
|
||||
"github.com/google/uuid"
|
||||
"gorm.io/gorm"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
@ -34,7 +35,8 @@ var VerifyEmail map[string]string
|
||||
|
||||
func init() {
|
||||
log = logger.Logger()
|
||||
mailServer = email.NewSmtpServer("mail.fossy.my.id", 25, "test@fossy.my.id", "Test123456")
|
||||
smtpPort, _ := strconv.Atoi(utils.Getenv("SMTP_PORT"))
|
||||
mailServer = email.NewSmtpServer(utils.Getenv("SMTP_HOST"), smtpPort, utils.Getenv("SMTP_USER"), utils.Getenv("SMTP_PASSWORD"))
|
||||
VerifyUser = make(map[string]*UnverifiedUser)
|
||||
VerifyEmail = make(map[string]string)
|
||||
|
||||
|
Reference in New Issue
Block a user