Fix no opt-in mails when existing subscribers subscriber to new opt-in lists. Closes #1257.
This commit is contained in:
parent
5aedc3a4f6
commit
152bd37c22
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue