Prospects: Listmonk mailing lists, and their opt-outs
Settings → Email → Mailing lists connects Listmonk (the Core's, by default) with an API user and its token; Test reads the lists. A person in Review can be added to a list, with their company, title and signal: a double opt-in list asks them to confirm unless they already agreed; a single opt-in list takes them only once they have; a suppressed address is refused. Their card shows the lists they're on (a new list_members table). Every hour, or on Sync now, everyone blocklisted in Listmonk or unsubscribed from one of its lists goes on the suppression list, with the reason; an address already there keeps its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -130,6 +130,7 @@
|
||||
{{if not $p.CompanyID}}{{template "signal-tag" dict "Kind" "contact" "ID" $p.ID "SignalID" $p.SignalID "D" $d}}{{end}}
|
||||
{{with index .Matches (printf "contact:%d" $p.ID)}}{{template "crm-matches" .}}{{end}}
|
||||
{{template "outcomes" dict "Kind" "contact" "ID" $p.ID "Tab" $tab "D" $d}}
|
||||
{{template "mailing" dict "P" $p "Tab" $tab "D" $d}}
|
||||
</div>
|
||||
{{if eq $p.Status $tab}}
|
||||
<div class="row-actions">
|
||||
@@ -204,3 +205,19 @@
|
||||
</form>
|
||||
</details>
|
||||
{{end}}
|
||||
|
||||
{{define "mailing"}}{{$d := .D}}{{$p := .P}}
|
||||
{{with index $d.OnLists $p.ID}}<p class="small muted">On {{range $i, $m := .}}{{if $i}}, {{end}}<strong>{{$m.List}}</strong>{{if not $m.Confirmed}} (asked to confirm){{end}} since {{ago $m.At}}{{end}}.</p>{{end}}
|
||||
{{if and $d.MailingLists $p.Email}}
|
||||
<details class="outcome">
|
||||
<summary class="small">Add to a mailing list</summary>
|
||||
<form method="post" action="/prospects/contact/{{$p.ID}}/list" class="row wrap">
|
||||
<input type="hidden" name="tab" value="{{.Tab}}"><input type="hidden" name="filter" value="{{$d.Signal}}">
|
||||
<label class="small">List <select name="list">{{range $d.MailingLists}}<option value="{{.ID}}">{{.Name}}{{if .Double}} (double opt-in){{else}} (single opt-in){{end}}</option>{{end}}</select></label>
|
||||
<label class="check small"><input type="checkbox" name="agreed"> They agreed to receive it</label>
|
||||
<button type="submit" class="secondary small">Add</button>
|
||||
</form>
|
||||
<p class="small muted">Without their agreement, only a double opt-in list takes them: Listmonk asks them to confirm, and they get nothing until they do. A single opt-in list sends its mail straight away, so it needs their agreement.</p>
|
||||
</details>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user