π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[server] Optional SMTP authentication
Tobias Genanntd25420c86762
diff --git a/server/pkg/utils/email/email.go b/server/pkg/utils/email/email.goindex 5666aed556..9586f5451e 100644--- a/server/pkg/utils/email/email.go+++ b/server/pkg/utils/email/email.go@@ -47,6 +47,10 @@ func sendViaSMTP(toEmails []string, fromName string, fromEmail string, subject ssmtpEmail := viper.GetString("smtp.email")var emailMessage string+ var auth smtp.Auth = nil+ if smtpUsername != "" && smtpPassword != "" {+ auth = smtp.PlainAuth("", smtpUsername, smtpPassword, smtpServer)+ }// Construct 'emailAddresses' with comma-separated email addressesvar emailAddresses string@@ -94,7 +98,6 @@ func sendViaSMTP(toEmails []string, fromName string, fromEmail string, subject s// Send the email to each recipientfor _, toEmail := range toEmails {- auth := smtp.PlainAuth("", smtpUsername, smtpPassword, smtpServer)err := smtp.SendMail(smtpServer+":"+smtpPort, auth, fromEmail, []string{toEmail}, []byte(emailMessage))if err != nil {errMsg := err.Error()