Merge pull request #149 from Alone2/fix/hardcode-email-address
Some checks are pending
Test and Build / test (push) Waiting to run
Test and Build / build (push) Blocked by required conditions

fix previously hardcoded email address
This commit is contained in:
Mohamad Tarbin 2025-03-17 01:18:57 -04:00 committed by GitHub
commit 5b10f63e65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,7 +32,7 @@ func NewEmailSender(conf *config.Config) *EmailSender {
func (es *EmailSender) SendVerificationEmail(to, code string) error { func (es *EmailSender) SendVerificationEmail(to, code string) error {
// msg := []byte(fmt.Sprintf("To: %s\r\nSubject: %s\r\n\r\n%s\r\n", to, subject, body)) // msg := []byte(fmt.Sprintf("To: %s\r\nSubject: %s\r\n\r\n%s\r\n", to, subject, body))
msg := gomail.NewMessage() msg := gomail.NewMessage()
msg.SetHeader("From", "no-reply@donetick.com") msg.SetHeader("From", es.client.Username)
msg.SetHeader("To", to) msg.SetHeader("To", to)
msg.SetHeader("Subject", "Welcome to Donetick! Verifiy you email") msg.SetHeader("Subject", "Welcome to Donetick! Verifiy you email")
// text/html for a html email // text/html for a html email
@ -259,7 +259,7 @@ func (es *EmailSender) SendVerificationEmail(to, code string) error {
func (es *EmailSender) SendResetPasswordEmail(c context.Context, to, code string) error { func (es *EmailSender) SendResetPasswordEmail(c context.Context, to, code string) error {
msg := gomail.NewMessage() msg := gomail.NewMessage()
msg.SetHeader("From", "no-reply@donetick.com") msg.SetHeader("From", es.client.Username)
msg.SetHeader("To", to) msg.SetHeader("To", to)
msg.SetHeader("Subject", "Donetick! Password Reset") msg.SetHeader("Subject", "Donetick! Password Reset")
htmlBody := ` htmlBody := `