BoxLang: Our new JVM Dynamic Language made by Ortus! Check it out: https://www.boxlang.io

Mail: Classloader issues when sending MultiPart email in Servlet Context

Description

Multipart tests pass in the test harness, but attempts to send multipart email in the servlet context will produce the following error:

Caused by: javax.mail.MessagingException: IOException while sending message; nested exception is: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary="----=_Part_9_753636188.1740173112954" at mail//com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1350) at mail//javax.mail.Transport.send0(Transport.java:231) at mail//javax.mail.Transport.send(Transport.java:100) at mail//org.apache.commons.mail.Email.sendMimeMessage(Email.java:1295)


This appears to be an issue with the classloader in play not having references to the DCH.

Activity

Show:

Jon Clausen February 21, 2025 at 10:25 PM

Update: The root cause of the issue is that com.sun.mail is not available in the servlet context, currently, so we will need to switch to jakarta.mail

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created February 21, 2025 at 9:32 PM
Updated February 22, 2025 at 4:11 AM
Resolved February 22, 2025 at 4:11 AM

Flag notifications