Skip to content

Releases

3.1.0

Choose a tag to compare

@mydoxie mydoxie released this 08 Nov 11:45
5127c71

Read before you update

  • In a Markdown mail, a text value now keeps its Markdown characters as plain text. So [Verify](https://evil.example) from a user is no longer a link. To put Markdown from a value, pass a SafeString.
  • In @if of a Markdown mail, a value with one of these characters (like * or [) is no longer equal to the same text written in the template.
  • Attachment.fromFile now reads the file when the mail is sent or queued, not when fromFile runs. A missing file now fails at send().

New

  • Mailables: one class per kind of email. Send it with send(), or queue it with queue() and later().
  • Markdown mail: a mailable can name a Markdown template.
  • MailMessage: an email made of lines and a button, with no template.
  • Notifications: Notification, MailChannel, Notifiable and user.notify(...).
  • Mail.queue(message) and Mail.later(delay, message). They need dox_queue.
  • Mail.fake() catches queued mail too, and has checks like assertSent and assertQueued.
  • Mail.onSending() and Mail.onSent() hooks. Mail.clearHooks() removes them.
  • Mail.alwaysTo(address) sends every email to one address, for example on staging.
  • Mail.raw(text, to: ..., subject: ...) sends a plain text email.
  • Chained recipients: Mail.to('ann@example.com').cc(...).bcc(...).send(mailable).
await user.notify(InvoicePaid(1));
await Mail.to('ann@example.com').queue(WelcomeMail(user));

Fixes

  • {{ tag }} inside backticks in a Markdown mail is no longer escaped twice.
  • FailoverTransport keeps going when an onError callback throws, also an async one.
  • Attachment.fromFile no longer blocks the server while it reads the file.
  • assertSentCount says "1 sent email".

Needs dox_core and dox_view 3.1.0.

Docs: Mail, Notifications

Full list: the CHANGELOG.

3.0.0

Choose a tag to compare

@necessarylion necessarylion released this 01 Nov 04:18
e0e82a7

The first stable release of dox_mailer.

Send email from Dox: SMTP, Amazon SES, Azure, Resend, Mailgun, Postmark, sendmail, and a failover mailer.

Docs: https://dartondox.dev/latest/digging-deeper/mail/