Error while using Email Connector.

0
I am getting this error when trying to execute Email using Email Connector Module.Could someone please help me in solving this. Failed to send an email to: arania2@adient.com an error occurred in the SendEmail java action : class com.sun.mail.handlers.text_html cannot be cast to class jakarta.activation.DataContentHandler (com.sun.mail.handlers.text_html and jakarta.activation.DataContentHandler are in unnamed module of loader com.mendix.container.deployment.internal.Interpreters$ClassLoaders$$anon$1 @22d7b4f8)   Stacktrace : com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.datahub.connector.email.utils.EmailConnectorException: EC0x043: Error while sending mails.  at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:108)   Caused by:com.mendix.datahub.connector.email.utils.EmailConnectorException: EC0x043: Error while sending mails.  at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:108)   Caused by:EC0x043: Error while sending mails.  at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:108)   Caused by:EC0x043: Error while sending mails.  at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:108)   Caused by:Failed to send email [ID: '<454730823.2.1720436689614@M5111376.autoexpr.com>'], reason: Unknown error  at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:108)   Caused by:class com.sun.mail.handlers.text_html cannot be cast to class jakarta.activation.DataContentHandler (com.sun.mail.handlers.text_html and jakarta.activation.DataContentHandler are in unnamed module of loader com.mendix.container.deployment.internal.Interpreters$ClassLoaders$$anon$1 @22d7b4f8)  at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:108)  
asked
1 answers
1

This looks like you have probably have conflicting jar files in your userlib exposing the same classes, but those classes are not compatible.

 

Have you upgraded to Email Connector from Email Template for example, and not cleaned out your application's userlib? 

 

I would suggest going into the userlib folder and removing all duplicates you can find, keeping just the versions with the highest revision numbers in the filenames. Also, remove any .jar that are from old modules that are no longer in use.

 

Good luck!

answered