Skip to content

Releases: adonisjs/mail

Final release with major changes

18 Nov 05:57

Choose a tag to compare

Pre-release

Alright, so from now on, the Mail package might not see any other big refactor. So, let's jot down the breaking changes from @adonisjs/[email protected] to @adonisjs/[email protected].

Breaking changes

  • The package is pure ESM and hence won't work with CJS projects anymore.
  • The @ioc:Adonis/Addons/Mail import has been replace with @adonisjs/mail/services/main. Both these imports returns an instance of the MailManager class.
  • Remove MailManager.extend method. We have changed the process of creating mail transports completely and the new docs will reflect the same.
  • The drivers have been renamed to transports. Since that sounds better and not generic.
  • Removed Mail.monitorQueue method. Instead listen for the queued:mail:error and mail:sent events.
  • Removed Mail.scheduleEmail. The method was never documented
  • Renamed Mailer.driver property to Mailer.transport. The mailer instance is returned when you call Mail.use method.
  • The FakeMailer has been revamped completely and the new APIs are not compatible with the old one's. So yes, you will have to refactor your tests interacting with the Fake mailer.

That's pretty much all. There are many internal refactors, which should not impact the end-user applications.

Commits

  • fix: broken path of file attachment test 26314a6
  • ci: update TEST_EMAILS_CC env var 81c7bcb
  • ci: update env variables 9ad12ce
  • feat: add back brevo transport 3923657
  • refactor: rename drivers to transports 6eb6ee4
  • feat: add support for sending variables to mailgun API call 10be8b2
  • feat: add support for list headers bb13767
  • refactor: another streak of refactors ad15bad

Full Changelog: v9.0.0-6...v9.0.0-7

Fix last broken release

15 Nov 05:56

Choose a tag to compare

Pre-release
  • fix: add list of files to publish on npm fc4d668

Full Changelog: v9.0.0-5...v9.0.0-6

Preparing for next major release targeting v6

15 Nov 05:44

Choose a tag to compare

Commits

  • chore: update peer dependencies aa54847
  • chore: build commands 5e8a482
  • feat: add make_mail command f903627
  • test: write tests for the configure command aad2abb
  • refactor: add resend driver and temporarily remove brevo driver 69a06e6
  • refactor: cleanup for v6 and better assertions API 4a9d326
  • feat: finish implementation of in-memory queue dd5a0c0
  • refactor: cleanup of drivers and mailer API 9da5f16
  • feat: add env variables validation c30a05d
  • chore: remove useless test 2ca21f7
  • fix(types): correct InferMailers type 869fd1d

Full Changelog: v9.0.0-4...v9.0.0-5

Migrate to new stubs, config and view system

26 Oct 20:14

Choose a tag to compare

  • style(tests): add explicit return type 119524b
  • style(tests): remove not used config key 469b3c6
  • fix(tests): add timeout for codemods 9c8579e
  • refactor: migrate to new config system d736313
  • style(tests): remove not used variable 1647bbb
  • refactor: remove get-stream c8df8d7
  • refactor: migrate to new codemods, new stubs and new view system (wip) 3ce139c
  • chore: add missing @types/luxon dev dep 4b81dfc
  • ci: update node tested versions 2f2ba64
  • chore: fix wrong typing 51180c0

v9.0.0-3...v9.0.0-4

v8.2.1

12 Aug 11:50

Choose a tag to compare

What's Changed

  • fix: Respect contracts directory defined in adonisjrc.json by @TiBianMod in #81

Full Changelog: v8.2.0...v8.2.1

Lazy imports drivers

21 Jul 14:32

Choose a tag to compare

Lazy imports drivers Pre-release
Pre-release

Breaking changes

  • Provider is now exported from @adonisjs/mail/mail_provider

Changes

  • Drivers transports are now lazily imported

Commits

  • refactor: lazily import aws-sdk/client-ses c35cb98
  • refactor: lazily import drivers transports bf8baba
  • refactor: update mail_provider export 6c6ebeb
  • chore: use single quotes in mail config stub e61f6da

v9.0.0-2...v9.0.0-3

Resend + REPL + `mail:sending`

13 Jul 23:19

Choose a tag to compare

Pre-release

Changes

  • Added a driver for Resend
  • Added a mail:sending event just before the mail is sent
  • Added REPL bindings

And mostly internal refactoring.

Commits

  • chore: add aws-sdk/client-ses as dev dep 5d37b94
  • feat: add mail:sending event 5955bd7
  • refactor: use makeUsingStub for make:mailer b8a69f1
  • chore: enable source maps on tests fd06f1a
  • refactor: some cleanup a9d7629
  • chore: add client-ses as optional peer dependency ffa0697
  • refactor: remove Macroable on Message class 049453b
  • refactor: directories structure 3948371
  • refactor: remove afterCompile hook e295b64
  • refactor: drivers folder/files structure 27d2ab8
  • chore: remove unused imports 09bcb18
  • feat: register repl bindings 0f9bfbf
  • refactor: update macroable 066c41f
  • chore: add engines.node bbd0861
  • chore: update published files 1be17aa
  • chore: update dependencies bef3eaf
  • style: update tooling config + lint files 6321f4b
  • ci: include lint and typecheck jobs e1688dc
  • refactor: move to japa 3 0865d0b
  • ci: add missing env var 57b1527
  • feat: add resend driver + transport 65f4dd5

v9.0.0-1...v9.0.0-2

Brevo + rename service

16 Jun 20:00

Choose a tag to compare

Pre-release

Main changes

  • Mailer service can now be imported from @adonisjs/mail/services/main to keep consistency with @adonisjs/view
  • Add Brevo ( ex sendinblue ) driver
  • Added an afterCompile hook + make Message class macroable, that will allow us to have a cleaner mjml integration

  • ci: add new env var for brevo 75532b1
  • feat: add brevo driver f56ba85
  • feat: add an afterCompile hook 2175389
  • feat: make message class macroable fcb6fc7
  • fix: wrong filename for service file de82173
  • style: lint files 26307a5
  • chore: use @adonisjs/tooling-config 0e7bcbb
  • refactor: mailer service to main 320ac59
  • feat: re-export driversList from root b9aeaf6
  • feat: add commands to rcfile in configure 5ad411b

v9.0.0-0...v9.0.0-1

Pre-release for v6

27 May 20:41

Choose a tag to compare

Pre-release for v6 Pre-release
Pre-release
  • Rewrited package for AdonisJS 6 and ESM ready. No breaking changes for the API except for ioc and esm stuff. Will be summarized in the documentation.
  • Added global mailer settings, to make local dev/testing easier, or to avoid having to set a "from" on allmails:
const mail = await this.app.container.make("mail")

// All mails will be sent to this email. Useful for debugging
mail.alwaysTo("[email protected]");

// All mails will be from this mail
mail.alwaysFrom("[email protected]");

Can also be specified in the defineConfig

  • added 3 methods to simplify tests on Mail.fake()
const fake = mailer.fake()

fake.assertSent(messageOrCallback)
fake.assertNotSent(messageOrCallback)
fake.assertNoneSent()
  • Migrate to aws-sdk v3 for SES driver. This doesn't create any breaking changes

Allow multiple addresses in `replyTo`

04 May 15:09

Choose a tag to compare

  • chore: update major for luxon and ical-generator 2e108ba
  • chore: update dependencies da531e8
  • fix: allow multiple addressed in replyTo (#82) fd6fa7e

v8.1.2...v8.2.0