Repository navigation
Send a test email for a mailing list - #503
Merged
Merged
Conversation
A test email sent from the console's Send Test Email dialog can now be sent for a mailing list. It carries that list's real unsubscribe and confirmation links and the List-Unsubscribe headers, and unsubscribing from it works. A broadcast's test preselects its audience list and, for a notice broadcast, leaves the header out as the broadcast does. The test's history row is now recorded under the contact's lowercase address, so unsubscribing from a test typed with capitals works. Refs #423
Leave the list field out of the transactional notification test, whose real sends carry no list. Omit the header only for the broadcast's own audience list, show a loading state while lists load, and say in the dialog, the docs and the changelog that a bounce or complaint on a test for a list changes the subscription. Cover a list picked from the field, reopening the dialog, the placeholder list, a bounce on the test and an unknown list through the full stack.
The send button stays disabled while a preselected list loads, so a quick send from a broadcast no longer goes out without its list. Narrow the notice broadcast wording to tests sent for its audience list.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #503 +/- ##
=======================================
Coverage 88.73% 88.73%
=======================================
Files 365 365
Lines 71197 71231 +34
=======================================
+ Hits 63174 63209 +35
+ Misses 5397 5396 -1
Partials 2626 2626
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #423.
What changes
The console's Send Test Email dialog has a new Mailing list field, on the templates and broadcasts pages. A test sent for a list carries that list's real
unsubscribe_url,oneclick_unsubscribe_url,confirm_subscription_urland{{ list.name }}, plus theList-UnsubscribeandList-Unsubscribe-Postheaders. Unsubscribing from the test works, even for a recipient who is not on the list.exclude_unsubscribed = false), the test for that list keeps the links but leaves out the header, as the broadcast does.POST /api/transactional.testTemplatetakes optionallist_idandomit_list_unsubscribe_header.lists:readon top oftransactional:write.message_historyrow carries the list, as a real send's does. So unsubscribing or confirming from the test, or a bounce or complaint reported on it, changes the recipient's subscription to the list. The dialog, the docs and the CHANGELOG say so.Version 43.1. No migration and no environment variable. The web analytics SDK bundle is rebuilt for the version.
Plan:
plans/feat-test-email-list-plan.md. Docs: Notifuse/docs#26.Tests
list_idlists:read, no list, caller URL replaced, header omitted, addresses typed with capitalsTestListUnsubscribeHeaders/test email for a list), through Mailpit:testEmailListProps, and the 8 cataloguesgo test -race ./internal/... ./pkg/...and the integration test abovenpx vitest run,npx tsc -b,npx eslint .(warnings unchanged from dev)Known, not handled
foo/barplaceholder list stays when no list is chosen.templates:readandcontacts:write, while the endpoint requirestransactional:write.email_options.list_unsubscribe_urlis still accepted as given from API callers without a list.web_analytics_sdk/package-lock.jsonstill carries 42.3.0, as ondev.