Skip to content

Newsletters 0.1.10: Role broadcasts send, and SMTP sends go out once

Newsletters 0.1.10 fixes three bugs that stopped broadcasts from going out as intended.

Role broadcasts can be sent

Send now and Schedule in the broadcast editor sent no form data, so the chosen roles were wiped on every click and every broadcast aimed at roles failed with “select at least one role”. Both buttons now submit the whole form.

SMTP sends go out once

With a send profile using SMTP, the delivery job crashed while reading the message id from the server’s reply, after the server had already accepted the email. The job was then retried and the same email sent again, up to the job’s retry limit. The reply is now read correctly in both shapes and never crashes the job.

Template tags in the wrapper template

When a broadcast used an email template as its wrapper, the template’s own tags, such as the {{unsubscribe_url}} link in its footer, were left as literal text in the sent email. Tags are now replaced once, after the body is placed in the template.

Full release notes: Newsletters 0.1.10

0.1.10 · 24 July 2026

Fixed

  • “Send now” and “Schedule” in the broadcast editor were phx-click buttons carrying no form data, so the params-authoritative role checkbox resolution wiped role_uuids to [] on every click — failing every user_group send with “select at least one role”. Both are now type="submit" buttons routed through a single phx-submit, so the full form (role checkboxes included) always reaches the handler.
  • DeliveryWorker crashed with BadMapError extracting the provider message id when the resolved send profile routed through Swoosh.Adapters.SMTP, which returns the server’s raw receipt as a string rather than a map — after the SMTP server had already accepted the message. Oban then retried the whole job, resending the same email up to max_attempts times. Message-id extraction now handles both the map shape (API adapters) and the SMTP receipt string, and never raises.
  • The broadcast’s {{content}} wrapper email template had its own variables (notably the {{unsubscribe_url}} footer link) substituted before the body was wrapped into it, so template-side tags shipped as literal text in the sent email. Variable substitution now runs once, after the body is merged into the wrapper.

Newsletters 0.1.10. Install or update: {:phoenix_kit_newsletters, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.