java/javamail/Makefile currently has JAVA_VERSION=8+, but it in fact will only build with JAVA_VERSION=8. (I tried JAVA_VERSION=11 and JAVA_VERSION=16, and both fail.) Simply removing the + fixed the issue.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=e81f8397c708934da23d468644a519df73b74adf commit e81f8397c708934da23d468644a519df73b74adf Author: Alex Dupre <ale@FreeBSD.org> AuthorDate: 2022-05-04 06:57:36 +0000 Commit: Alex Dupre <ale@FreeBSD.org> CommitDate: 2022-05-04 06:57:36 +0000 java/javamail: restrict to java version 8 The Java Activation Framework (jaf), required to build javamail, was included in JRE 1.6, but later removed in JRE 11. PR: 263600 Submitted by: wcarson.bugzilla@disillusion.net java/javamail/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)