Skip to content
CAI
Software that uses CAICheck a score

playframework/play-mailer

58.0

Adequate · 20 September 2026

885

lines of production code

Scala

with Java

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is a library and plugin ecosystem for the Play Framework, primarily focused on providing email sending capabilities through the play-mailer module and supporting dependency injection via play-mailer-guice. It facilitates email composition and transmission with modern Jakarta EE APIs, secure SSL configurations, and flexible attachment handling. The project also includes sample applications demonstrating both compile-time and runtime dependency injection patterns within the Play environment.

How it got here

2012 — Removal of legacy inject plugin infrastructure

5 changes.

This period focused on stripping out the legacy MiniGuice-based dependency injection implementation and its associated build configurations from the inject module. The work involved deleting the SBT build definitions, sample applications, and configuration files that supported the old Play 1.x and early Play 2.0 integration, effectively removing the outdated injection mechanism.

2014–2015 — Jakarta migration and DI samples

5 changes.

The project updated its build infrastructure to support Play 2.9 and migrated core dependencies to the Jakarta EE namespace, including Jakarta Inject and Commons Mail 2. New sample applications were added to demonstrate compile-time and runtime dependency injection patterns using these updated Jakarta-based libraries.

2017 — Jakarta EE migration and Guice integration

7 changes.

The Play Mailer library was migrated from the Java EE namespace to Jakarta EE, updating dependencies to Apache Commons Email 2 and enabling secure SSL server identity verification by default. A new Guice integration module was introduced to provide dependency injection bindings, while comprehensive test suites were added to validate configuration, SMTP connections, and attachment handling.

Features

Added compile-time DI sample with Jakarta Mail support

A new sample application in the compile-time DI directory demonstrates how to wire Play components using compile-time dependency injection. The sample includes a custom ApplicationLoader and controller that utilize the Jakarta-based commons-mail2 library to send emails with inline attachments (CID) and configure SMTP settings pointing to example.org.

samples/compile-timeDI · high confidence

Added compile-time and runtime DI sample applications

New sample projects for compile-time and runtime dependency injection have been added to the samples directory. The compile-time DI sample demonstrates a basic Play application setup using \SimpleApplicationLoader\ with routes for sending emails, while the runtime DI sample provides Java and Scala controllers for sending emails, including an example of custom mailer configuration. Both samples are configured to use sbt 1.13.0 and the Play 3.1.0-M9 sbt plugin.

samples · high confidence

Guice integration module added for Play Mailer

A new Guice-specific module has been introduced to the project, providing the necessary dependency injection bindings for the Play Mailer library. This includes \MailerModule\ and \SMTPConfigurationModule\ classes that wire up the \MailerClient\, \JMailerClient\, and \SMTPConfiguration\ to their respective implementations (such as \SMTPDynamicMailer\ and \MockMailer\), along with a \reference.conf\ file to automatically enable these modules in the application's classpath.

play-mailer-guice, play-mailer-guice/src/main/scala/play/api/libs/mailer · high confidence

Removals

Removal of MiniGuice-based dependency injection plugin

The \inject\ module's support for the MiniGuice lightweight injector has been removed. This change deletes the \MiniGuice\ implementation, the \Helper\ class used for classpath scanning, and the \InjectPlugin\ and \InjectViaMiniGuicePlugin\ components that wired this injector into the Play application lifecycle. Users relying on this specific lightweight injection mechanism will no longer have access to it through this plugin.

inject/src · high confidence

Removal of SBT build configuration for inject plugin

The SBT build definition (Build.scala) and build properties (build.properties) for the inject plugin have been removed from the repository. This deletion eliminates the project's build configuration, including the SBT version (0.11.2) and dependencies on Play Framework and AtInject/Guice annotations, effectively stripping the build infrastructure for this specific module.

inject/project · high confidence

Removal of legacy SBT build configuration files

The SBT build configuration files (Build.scala, build.properties, and plugins.sbt) for the inject sample project have been removed. This eliminates the project's dependency on the Play Framework 2.0-RC3 and SBT 0.11.2, effectively stripping the legacy build setup from this location.

inject/sample/project · high confidence

Removal of legacy inject sample application

The sample application located in \inject/sample\ has been removed. This deletion eliminates the previous demonstration of staticless manual dependency injection, including the controller, service classes, dependency module, views, and associated static assets like jQuery.

inject/sample · high confidence

Behavioural changes

Default SSL server identity verification enabled

The play-mailer module now includes a default configuration file (reference.conf) that enables SSL server identity verification by default (play.mailer.props.ssl.checkserveridentity=true). This change improves security by ensuring that SSL certificates are validated against the server identity, reducing the risk of man-in-the-middle attacks when using SSL/TLS for email transmission. Users relying on the previous implicit behavior may notice stricter certificate validation, which could affect connections to servers with self-signed or mismatched certificates.

play-mailer · high confidence

Migration to Jakarta EE and Apache Commons Email 2

The play-mailer library has migrated its underlying dependencies from the Java EE (javax) namespace to the Jakarta EE (jakarta) namespace, specifically switching to Apache Commons Email 2 (Jakarta edition). This change updates the internal implementation classes (such as CommonsMailer and SMTPMailer) to use jakarta.mail and jakarta.activation APIs, ensuring compatibility with modern Jakarta-based environments. For users, this is a behavioral change requiring that any custom mailer implementations or configurations relying on the old javax.\* imports be updated to use their jakarta.\* equivalents.

play-mailer/src/main/scala/play/api/libs/mailer · high confidence

Migration to Jakarta Mail API and new streaming attachment support

The play-mailer library has been updated to use the Jakarta Mail API (commons-email2) instead of the legacy JavaMail API, which may require users to update their dependency imports. Additionally, the \Attachment\ class now supports streaming attachments via \DataSource\ and \URL\ types, allowing for more efficient handling of large files without loading them entirely into memory.

play-mailer/src/main/java/play/libs/mailer · high confidence

Play Mailer library restructured for Play 2.6.18 and Jakarta EE

The Play Mailer library has been updated to support Play 2.6.18 and migrated to the Jakarta EE namespace (Jakarta Mail/Activation). This change introduces new data models for email composition, including specific attachment types for data, files, URLs, and DataSources, allowing for more flexible attachment handling. The SMTP configuration model now explicitly supports a generic \props\ configuration block, enabling users to pass arbitrary mailer properties. These changes represent a significant behavioral update to how emails are constructed and configured within the application.

repository · high confidence

Removal of legacy Play 1.x configuration and plugin files

The sample application in the \inject/sample/conf\ directory has removed its legacy Play 1.x configuration files, including \application.conf\, \play.plugins\, and \routes\. This cleanup eliminates the old dependency injection plugin registration (\InjectViaMiniGuicePlugin\) and the previous routing and application settings, aligning the sample with the new inject plugin structure.

inject/sample/conf · high confidence

Updated runtime DI sample to use Jakarta EE and inline image attachments

The runtime dependency injection sample has been updated to use the Jakarta EE namespace (jakarta.inject) and the Apache Commons Mail 2 Jakarta library, replacing the previous javax-based imports. The sample controllers now demonstrate sending emails with inline attachments using Content-IDs (cid), and include a new custom SMTP configuration module that binds to example.org:1234, allowing users to see how to override default mailer settings via runtime DI.

samples/runtimeDI · high confidence

Test coverage

Added tests for Guice integration and configuration validation; Added tests for MailerPlugin SMTP configuration and email creation.

Dependencies

Build infrastructure updated to sbt 2 and Play 3.1.0-M9

The project's build configuration has been refreshed to use sbt version 2.0.8, replacing the previous 1.x series. Dependency management now targets Play 3.1.0-M9 and supports Scala 2.13.18 and Scala 3.9.0. The build plugins have been updated to sbt-mima-plugin 1.2.0 for binary compatibility checking and sbt-ci-release 1.12.1 for release automation.

project · high confidence

Upgrade to Play 2.9, Scala 3.9, and Jakarta-based dependencies

The build system has been updated to support Play 2.9 (via \Dependencies.PlayVersion\), Scala 2.13.18, and Scala 3.9.0. Core dependencies have migrated to Jakarta namespaces, specifically using \jakarta.inject-api\ 2.0.1, \commons-email2-jakarta\ 2.0.0-M1, and Guice 7.0.0. The \play-mailer\ module now depends on \slf4j-api\ 2.0.19 and \typesafe:config\ 1.4.9. Sample applications for compile-time and runtime DI have been added, configured to cross-compile against Scala 2.13.18 and 3.9.0, and use \scalatestplus-play\ 8.0.0-M2.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 58.

Lenses

  • Code Health 95
  • Architecture 67
  • Maturity 49
  • Readiness 69
  • Security 60

Changes since last survey

  • 300 commits — 293 feature/other, 7 fixes

By area

  • (repo) — 130 commits
  • project/build.properties — 38 commits
  • project/Dependencies.scala — 35 commits
  • (root) — 31 commits
  • .github/workflows — 17 commits
  • project/plugins.sbt — 16 commits
  • samples/compile-timeDI — 14 commits
  • .github/scala-steward.conf — 5 commits
  • .github/dependabot.yml — 4 commits
  • play-mailer-guice/src — 3 commits
  • play-mailer/src — 3 commits
  • project/Common.scala — 2 commits
  • samples/runtimeDI — 2 commits

Notable commits

  • fix: Fix Dependency Graph action
  • fix: Merge pull request #380 from playframework/fix-dep-graph
  • fix: Merge pull request #506 from mkurz/fix-release-drafter
  • fix: Once more try to fix sbt-dependency-submission
  • fix: Revert "Try to fix sbt-dependency-submission"
  • fix: Try to fix sbt-dependency-submission
  • fix: fix warnings. use scala.jdk.CollectionConverters
  • change: "Correct" dependency submission workflow
  • change: -Werror instead of -Xfatal-warnings, -deprecation gets set by Play already
  • change: 9.1.x and 10.1.x are the new stable branches
  • change: Add Scala 3
  • change: Add prefix to Dependabot commit message / PR title
  • change: Adjust MiMa's previous version
  • change: Adjust tests for Scala 3
  • change: Bump actions/checkout from 4 to 5
  • change: Bump actions/checkout from 5 to 6
  • change: Bump actions/checkout from 6 to 7
  • change: Bump playframework/.github from 3 to 4
  • change: Bump release-drafter/release-drafter from 6 to 7
  • change: Bump scalacenter/sbt-dependency-submission from 2 to 3
  • …and 280 more

Architecture

  • 0 containers · 1 bounded contexts · 0 dependency edges (baseline)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

playframework/play-mailer was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit fa93319fb30156f83404782edfddea87afa6b55a — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.