Email Connector issue

I am trying to add the “Email Connector” module from the marketplace. I followed the pre-requisites in the documentation. I removed all unused jars (Had to delete the jars one set at a time and run the app and check if it is breaking – Had to test more than 20 times). I tried replacing the jakarta mail jar which I downloaded from here “”. I am still facing the “ServiceConfigurationError” exception. Please, help me with the fix.   Sudio Pro Version: 9.18.3     java.util.ServiceConfigurationError: jakarta.mail.Provider: com.sun.mail.imap.IMAPProvider not a subtype     at java.base/     at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(     at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(     at java.base/java.util.ServiceLoader$2.hasNext(     at java.base/java.util.ServiceLoader$3.hasNext(     at jakarta.mail.Session.loadProviders(     at jakarta.mail.Session.<init>(     at jakarta.mail.Session.getInstance(     at org.simplejavamail.mailer.internal.MailerImpl.createMailSession(     at org.simplejavamail.mailer.internal.MailerImpl.<init>(     at org.simplejavamail.mailer.internal.MailerImpl.<init>(     at org.simplejavamail.mailer.internal.MailerRegularBuilderImpl.buildMailer(
3 answers

when running locally you might need to clean your deployment directory to remove old .jar files there too.
Have you tried that?


Following the instructions in the Prerequisites of the Email Connector module worked for me:

  1. Download and configure the latest version of Mx Model Reflection module. If you have the module already, ensure that it is up-to-date.
  2. Download and configure the latest version of the Encryption module. If you have the module already, ensure that it is up-to-date.
  3. Remove any existing email modules (IMAP/POP3 or Email Module with Templates).
  4. Check for and remove orphaned JAR files from any old email modules in the userlib subdirectory (including javax.mail-1.6.2.jaractivation-1.1.jar, and commons-email.jar).
  5. Clean the deployment directory before running the app

As I had to migrate the data from the Email Template module to the Email Connector module I could not delete the Email Template module. Instead, I deleted all the jar-files related to this modules in the userlib as well as the subfolders for the Email Template module in the folders javasource and javascriptsource, after ensuring that there was no use of the module anymore in the model. After downloading the relevant modules again (Email Connector, Encryption and Model Reflection) once again and cleaning up the userlib for older versions of the jar-files, the email connection worked.


The Email Connector module should include all the .jar files it needs. If you download jars from another location you could be downloading the wrong version and seeing errors like the one you describe in your question.

I would suggest removing the .jar files you downloaded from elsewhere and just reinstall the Email Connector module directly from the Mendix Marketplace in Studio Pro.

I hope this helps.