Skip to content

Final release with major changes

Pre-release
Pre-release
Compare
Choose a tag to compare
@thetutlage thetutlage released this 18 Nov 05:57
· 41 commits to develop since this 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/mail@8.x to @adonisjs/mail@9.x.

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