Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix no opt-in mails when existing subscribers subscriber to new opt-in lists. Closes #1257.

Kailash Nadh152bd37c2213
diff --git a/internal/core/subscribers.go b/internal/core/subscribers.go
index 2dc386c0..e91f4417 100644
--- a/internal/core/subscribers.go
+++ b/internal/core/subscribers.go
@@ -287,7 +287,7 @@ func (c *Core) InsertSubscriber(sub models.Subscriber, listIDs []int, listUUIDs
}
}
- // Fetch the subscriber'out full data. If the subscriber already existed and wasn't
+ // Fetch the subscriber's full data. If the subscriber already existed and wasn't
// created, the id will be empty. Fetch the details by e-mail then.
out, err := c.GetSubscriber(sub.ID, "", sub.Email)
if err != nil {
@@ -379,6 +379,11 @@ func (c *Core) UpdateSubscriberWithLists(id int, sub models.Subscriber, listIDs
return models.Subscriber{}, err
}
+ if !preconfirm && c.constants.SendOptinConfirmation {
+ // Send a confirmation e-mail (if there are any double opt-in lists).
+ c.h.SendOptinConfirmation(out, listIDs)
+ }
+
return out, nil
}