Fixed subject line and css
This commit is contained in:
+14
-1
@@ -895,8 +895,21 @@ func makeOptinNotifyHook(unsubHeader bool, u *UrlConfig, q *models.Queries, i *i
|
||||
hdr.Set("List-Unsubscribe", `<`+unsubURL+`>`)
|
||||
}
|
||||
|
||||
// Build the subject with public list names. Private list names are
|
||||
// not leaked in the subject, mirroring the e-mail body.
|
||||
var pubNames []string
|
||||
for _, l := range out.Lists {
|
||||
if l.Type == models.ListTypePublic {
|
||||
pubNames = append(pubNames, l.Name)
|
||||
}
|
||||
}
|
||||
subject := i.T("subscribers.optinSubject")
|
||||
if len(pubNames) > 0 {
|
||||
subject = i.Ts("subscribers.optinSubjectList", "name", strings.Join(pubNames, ", "))
|
||||
}
|
||||
|
||||
// Send the e-mail.
|
||||
if err := notifs.Notify([]string{sub.Email}, i.T("subscribers.optinSubject"), notifs.TplSubscriberOptin, out, hdr); err != nil {
|
||||
if err := notifs.Notify([]string{sub.Email}, subject, notifs.TplSubscriberOptin, out, hdr); err != nil {
|
||||
lo.Printf("error sending opt-in e-mail for subscriber %d (%s): %s", sub.ID, sub.UUID, err)
|
||||
return 0, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user