Newsletters 0.7.1: A visible unsubscribe link in every newsletter email
Newsletters 0.7.1 makes sure every newsletter email sent from your Phoenix app gives its reader a visible way to unsubscribe, even when the email’s layout was written without an unsubscribe link.
An unsubscribe line where one was missing
When the finished email does not contain the reader’s {{unsubscribe_url}}, the module now adds a small Unsubscribe line at the end of the HTML body, in the reader’s language, and the address at the end of the plain-text part. This covers a broadcast with no layout, a body written as a whole HTML document, and older layouts that never had the link, so existing layouts start showing it without being edited.
The broadcast preview: the layout has no unsubscribe link, so 0.7.1 adds the line under the email.
Nothing is doubled: a link written by the author, by the layout or by your app’s _footer-newsletters file counts. A link hidden inside an HTML comment does not count, and neither does a {{preferences_url}} link, because preference links expire. The broadcast and layout previews show the added line, so what you see is what is sent.
Anti-spam laws such as CAN-SPAM and CASL, and the big mailbox providers’ rules for bulk senders, expect a working unsubscribe link, so this keeps newsletters deliverable as well as polite.
Upgrading
No migration and no configuration. If you’d rather control the wording and placement yourself, put {{unsubscribe_url}} in your layout and the automatic line stays out.
Full release notes: Newsletters 0.7.1
0.7.1 · 6 November 2026
Added
- Every email gives its reader a visible way to unsubscribe. When the finished HTML does not hold the reader’s
{{unsubscribe_url}}, a small Unsubscribe line goes at the end of the body, in the reader’s language, and the address goes at the end of the text part. This covers a broadcast with no layout, a whole-document body and a layout without the link, so existing layouts without one start showing it. A link from the author, the layout or a host’s_footer-newslettersfile counts, so nothing is doubled. A link inside an HTML comment does not count, nor does a{{preferences_url}}link, as that token expires. The broadcast and layout editor previews show the line.
Newsletters 0.7.1. Install or update: {:phoenix_kit_newsletters, "~> 0.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.