Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Change name

Vishalcc3376154fb9
diff --git a/server/configurations/local.yaml b/server/configurations/local.yaml
index 2cd0aca3cb..2b90deaaf8 100644
--- a/server/configurations/local.yaml
+++ b/server/configurations/local.yaml
@@ -166,7 +166,7 @@ transmail:
# AWS SES
# Use case: Sending mails
-ses-smtp:
+smtp:
isEnabled: false
host:
port:
diff --git a/server/pkg/utils/email/email.go b/server/pkg/utils/email/email.go
index 71c831dc97..a85fe03312 100644
--- a/server/pkg/utils/email/email.go
+++ b/server/pkg/utils/email/email.go
@@ -19,15 +19,15 @@ import (
"github.com/spf13/viper"
)
-func SendSES(toEmails []string, fromName string, fromEmail string, subject string, htmlBody string, inlineImages []map[string]interface{}) error {
+func sendViaSMTP(toEmails []string, fromName string, fromEmail string, subject string, htmlBody string, inlineImages []map[string]interface{}) error {
if len(toEmails) == 0 {
return ente.ErrBadRequest
}
- smtpServer := viper.GetString("ses-smtp.host")
- smtpPort := viper.GetString("ses-smtp.port")
- smtpUsername := viper.GetString("ses-smtp.username")
- smtpPassword := viper.GetString("ses-smtp.password")
+ smtpServer := viper.GetString("smtp.host")
+ smtpPort := viper.GetString("smtp.port")
+ smtpUsername := viper.GetString("smtp.username")
+ smtpPassword := viper.GetString("smtp.password")
var emailMessage string
@@ -134,9 +134,9 @@ func SendTemplatedEmail(to []string, fromName string, fromEmail string, subject
return stacktrace.Propagate(err, "")
}
- isSESEnabled := viper.GetBool("ses-smtp.isEnabled")
+ isSESEnabled := viper.GetBool("smtp.isEnabled")
if isSESEnabled {
- return SendSES(to, fromName, fromEmail, subject, body, inlineImages)
+ return sendViaSMTP(to, fromName, fromEmail, subject, body, inlineImages)
} else {
return Send(to, fromName, fromEmail, subject, body, inlineImages)
}