bugfixes and stiffening in the dialog rendering pipeline and the login dialog

This commit is contained in:
2025-10-08 13:35:21 -06:00
parent 933d028196
commit af25adc85f
7 changed files with 55 additions and 24 deletions
+6 -1
View File
@@ -120,7 +120,10 @@ func transmitMessage(m *amMessage, body []byte) {
}
}
if err == nil {
if err = cl.Auth(auth); err == nil {
if auth != nil {
err = cl.Auth(auth)
}
if err == nil {
if err = cl.Mail(m.fromAddr); err == nil {
for _, addr := range m.toAddrs {
if err = cl.Rcpt(addr); err != nil {
@@ -187,6 +190,8 @@ func SetupMailSender() func() {
// Initialize mail host and authentication.
mailHost = fmt.Sprintf("%s:%d", config.GlobalConfig.Email.Host, config.GlobalConfig.Email.Port)
switch config.GlobalConfig.Email.AuthType {
case "none":
auth = nil
case "plain":
auth = smtp.PlainAuth("", config.GlobalConfig.Email.User, config.GlobalConfig.Email.Password,
config.GlobalConfig.Email.Host)