<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>KB-2215 How to update a custom plug-in using the JavaMail library to use the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-2215 How to update a custom plug-in using the JavaMail library to use the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library</link><pubDate>Tue, 13 Sep 2022 15:29:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>Kevin Kleinegger</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Current Revision posted to Appian Knowledge Base by Kevin Kleinegger on 9/13/2022 3:29:11 PM&lt;br /&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In Appian 22.3, the mail library available for use in custom plug-ins has been updated from JavaMail (&lt;code&gt;javax.mail&lt;/code&gt;) to Jakarta Mail (&lt;code&gt;jakarta.mail&lt;/code&gt;). Custom plug-ins that reference the JavaMail library will need to be updated to use the Jakarta Mail library to continue to work in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;This article outlines how to update a custom plug-in to use the Jakarta Mail library, which requires that import statements in each java class that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;javax.activation&lt;/code&gt; packages to be updated to reference the &lt;code&gt;jakarta.mail&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;Instructions - Gradle&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In the project &lt;/span&gt;&lt;strong&gt;build.gradle&lt;/strong&gt;&lt;span style="font-weight:400;"&gt; file:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure that any &lt;code&gt;javax.mail&lt;/code&gt; and &lt;code&gt;javax.activation&lt;/code&gt; dependencies are removed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Add the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; dependencies as compileOnly dependencies.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;&lt;pre class="ui-code" data-mode="php"&gt;dependencies {
// .... other project dependencies ....

compileOnly &amp;#39;com.sun.mail:jakarta.mail:2.0.1&amp;#39;
compileOnly &amp;#39;com.sun.activation:jakarta.activation:2.0.1&amp;#39;

}&lt;/pre&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;Instructions - Maven&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;In the project &lt;strong&gt;pom.xml&lt;/strong&gt; file:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure that any &lt;code&gt;javax.mail&lt;/code&gt; and &lt;code&gt;javax.activation&lt;/code&gt; dependencies are removed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Add the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; dependencies as system scoped dependencies.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="xml"&gt;&amp;lt;dependencies&amp;gt;
    &amp;lt;!-- .... other project dependencies .... --&amp;gt;
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;com.sun.mail&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;jakarta.mail&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;2.0.1&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;system&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;com.sun.activation&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;jakarta.activation&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;2.0.1&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;system&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
&amp;lt;/dependencies&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;Instructions - Eclipse IDE&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Below are example&amp;nbsp;steps&amp;nbsp;for updating a plug-in project in Eclipse.&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open&amp;nbsp;the existing plug-in project in &lt;/span&gt;Eclipse.&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-11/1016.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the project builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the&amp;nbsp;project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Download the Jakarta Mail and Jakarta Activation JARs&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Download the Jakarta Mail JAR at: &lt;a href="https://repo1.maven.org/maven2/com/sun/mail/jakarta.mail/2.0.1/jakarta.mail-2.0.1.jar"&gt;https://repo1.maven.org/maven2/com/sun/mail/jakarta.mail/2.0.1/jakarta.mail-2.0.1.jar&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Download the Jakarta Activation JAR at: &lt;a href="https://repo1.maven.org/maven2/com/sun/activation/jakarta.activation/2.0.1/jakarta.activation-2.0.1.jar"&gt;https://repo1.maven.org/maven2/com/sun/activation/jakarta.activation/2.0.1/jakarta.activation-2.0.1.jar&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Save these JARs locally in a location outside of the plugin project for use later.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Remove the JavaMail dependency JAR in &lt;/span&gt;&lt;code&gt;META-INF/lib&lt;/code&gt;.
&lt;ol&gt;
&lt;li&gt;Delete the existing javax.mail and/or javax.activation JARs present in&amp;nbsp;&lt;code&gt;&lt;span&gt;META-INF/lib&lt;/span&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;remove&lt;span style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;the JavaMail library JAR&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the Java Build Path to include any new JAR files; otherwise, the project&amp;nbsp;will not build.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation), click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail libraries and click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Add the Jakarta&amp;nbsp;JARs as external dependencies to the project
&lt;ol&gt;
&lt;li&gt;Right-click the project. Click &lt;strong&gt;Properties&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the left navigation, select &lt;strong&gt;Java Build Path&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;Libraries&lt;/strong&gt; tab. Click the &lt;strong&gt;Add External JARs&lt;/strong&gt;&amp;hellip; button.&lt;/li&gt;
&lt;li&gt;Add the&amp;nbsp;Jakarta Mail JAR as an external dependency and click &lt;strong&gt;OK&lt;/strong&gt;.
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;LOCATION_SAVED_EARLIER&amp;gt;/jakarta.mail-2.0.1.jar&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Click the&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Add External JARs&lt;/strong&gt;&lt;span&gt;&amp;hellip; button.&amp;nbsp;&lt;/span&gt;Add the Jakarta Activation JAR as an external dependency and click &lt;strong&gt;OK&lt;/strong&gt;.
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;LOCATION_SAVED_EARLIER&amp;gt;/jakarta.activation-2.0.1.jar&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update any Java classes that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;/code&gt; or&amp;nbsp;&lt;code&gt;javax.activation&lt;/code&gt; packages to use the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&amp;nbsp;&lt;/span&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this library.
&lt;ol&gt;
&lt;li&gt;Example class using &lt;code&gt;javax.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Example class updated to use &lt;code&gt;jakarta.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;b&gt;However, there may be some differences that will require updates to the plug-in beyond the update of the package naming alone.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plug-in version in &lt;/span&gt;&lt;strong&gt;&lt;code&gt;appian-plugin.xml&lt;/code&gt;&lt;/strong&gt;.
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of&amp;nbsp;the plug-in from the existing release that implements the JavaMail library, increment the plug-in version within&lt;strong&gt;&amp;nbsp;appian-plugin.xml.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;As this is a change beyond a simple revision, the minor or major version of the plug-in&amp;nbsp;can be incremented (e.g. &lt;code&gt;&amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;/code&gt; to&amp;nbsp;&lt;code&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/code&gt;).&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated plug-in builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;code&gt;_admin/plugins&lt;/code&gt;&lt;span style="font-weight:400;"&gt; folder of&amp;nbsp;the installation directory for&amp;nbsp;the export destination (this directory is created during application server startup).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;This article applies to Appian 22.3 and later.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed:&amp;nbsp;September 2022&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integration, how-to, plugins&lt;/div&gt;
</description></item><item><title>KB-2215 How to update a custom plug-in using the JavaMail library to use the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library/revision/13</link><pubDate>Tue, 13 Sep 2022 15:28:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>Kevin Kleinegger</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Revision 13 posted to Appian Knowledge Base by Kevin Kleinegger on 9/13/2022 3:28:15 PM&lt;br /&gt;
&lt;h2&gt;&lt;span style="color:#ff0000;font-size:75%;"&gt;&lt;/span&gt;Purpose&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In Appian 22.3, the mail library available for use in custom plug-ins has been updated from JavaMail (&lt;code&gt;javax.mail&lt;/code&gt;) to Jakarta Mail (&lt;code&gt;jakarta.mail&lt;/code&gt;). Custom plug-ins that reference the JavaMail library will need to be updated to use the Jakarta Mail library to continue to work in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;This article outlines how to update a custom plug-in to use the Jakarta Mail library, which requires that import statements in each java class that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;javax.activation&lt;/code&gt; packages to be updated to reference the &lt;code&gt;jakarta.mail&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;Instructions - Gradle&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In the project &lt;/span&gt;&lt;strong&gt;build.gradle&lt;/strong&gt;&lt;span style="font-weight:400;"&gt; file:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure that any &lt;code&gt;javax.mail&lt;/code&gt; and &lt;code&gt;javax.activation&lt;/code&gt; dependencies are removed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Add the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; dependencies as compileOnly dependencies.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;&lt;pre class="ui-code" data-mode="php"&gt;dependencies {
// .... other project dependencies ....

compileOnly &amp;#39;com.sun.mail:jakarta.mail:2.0.1&amp;#39;
compileOnly &amp;#39;com.sun.activation:jakarta.activation:2.0.1&amp;#39;

}&lt;/pre&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;Instructions - Maven&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;In the project &lt;strong&gt;pom.xml&lt;/strong&gt; file:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure that any &lt;code&gt;javax.mail&lt;/code&gt; and &lt;code&gt;javax.activation&lt;/code&gt; dependencies are removed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Add the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; dependencies as system scoped dependencies.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="xml"&gt;&amp;lt;dependencies&amp;gt;
    &amp;lt;!-- .... other project dependencies .... --&amp;gt;
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;com.sun.mail&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;jakarta.mail&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;2.0.1&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;system&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;com.sun.activation&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;jakarta.activation&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;2.0.1&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;system&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
&amp;lt;/dependencies&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;Instructions - Eclipse IDE&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Below are example&amp;nbsp;steps&amp;nbsp;for updating a plug-in project in Eclipse.&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open&amp;nbsp;the existing plug-in project in &lt;/span&gt;Eclipse.&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-11/1016.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the project builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the&amp;nbsp;project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Download the Jakarta Mail and Jakarta Activation JARs&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Download the Jakarta Mail JAR at: &lt;a href="https://repo1.maven.org/maven2/com/sun/mail/jakarta.mail/2.0.1/jakarta.mail-2.0.1.jar"&gt;https://repo1.maven.org/maven2/com/sun/mail/jakarta.mail/2.0.1/jakarta.mail-2.0.1.jar&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Download the Jakarta Activation JAR at: &lt;a href="https://repo1.maven.org/maven2/com/sun/activation/jakarta.activation/2.0.1/jakarta.activation-2.0.1.jar"&gt;https://repo1.maven.org/maven2/com/sun/activation/jakarta.activation/2.0.1/jakarta.activation-2.0.1.jar&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Save these JARs locally in a location outside of the plugin project for use later.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Remove the JavaMail dependency JAR in &lt;/span&gt;&lt;code&gt;META-INF/lib&lt;/code&gt;.
&lt;ol&gt;
&lt;li&gt;Delete the existing javax.mail and/or javax.activation JARs present in&amp;nbsp;&lt;code&gt;&lt;span&gt;META-INF/lib&lt;/span&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;remove&lt;span style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;the JavaMail library JAR&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the Java Build Path to include any new JAR files; otherwise, the project&amp;nbsp;will not build.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation), click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail libraries and click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Add the Jakarta&amp;nbsp;JARs as external dependencies to the project
&lt;ol&gt;
&lt;li&gt;Right-click the project. Click &lt;strong&gt;Properties&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the left navigation, select &lt;strong&gt;Java Build Path&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;Libraries&lt;/strong&gt; tab. Click the &lt;strong&gt;Add External JARs&lt;/strong&gt;&amp;hellip; button.&lt;/li&gt;
&lt;li&gt;Add the&amp;nbsp;Jakarta Mail JAR as an external dependency and click &lt;strong&gt;OK&lt;/strong&gt;.
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;LOCATION_SAVED_EARLIER&amp;gt;/jakarta.mail-2.0.1.jar&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Click the&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Add External JARs&lt;/strong&gt;&lt;span&gt;&amp;hellip; button.&amp;nbsp;&lt;/span&gt;Add the Jakarta Activation JAR as an external dependency and click &lt;strong&gt;OK&lt;/strong&gt;.
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;LOCATION_SAVED_EARLIER&amp;gt;/jakarta.activation-2.0.1.jar&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update any Java classes that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;/code&gt; or&amp;nbsp;&lt;code&gt;javax.activation&lt;/code&gt; packages to use the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&amp;nbsp;&lt;/span&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this library.
&lt;ol&gt;
&lt;li&gt;Example class using &lt;code&gt;javax.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Example class updated to use &lt;code&gt;jakarta.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;b&gt;However, there may be some differences that will require updates to the plug-in beyond the update of the package naming alone.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plug-in version in &lt;/span&gt;&lt;strong&gt;&lt;code&gt;appian-plugin.xml&lt;/code&gt;&lt;/strong&gt;.
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of&amp;nbsp;the plug-in from the existing release that implements the JavaMail library, increment the plug-in version within&lt;strong&gt;&amp;nbsp;appian-plugin.xml.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;As this is a change beyond a simple revision, the minor or major version of the plug-in&amp;nbsp;can be incremented (e.g. &lt;code&gt;&amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;/code&gt; to&amp;nbsp;&lt;code&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/code&gt;).&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated plug-in builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;code&gt;_admin/plugins&lt;/code&gt;&lt;span style="font-weight:400;"&gt; folder of&amp;nbsp;the installation directory for&amp;nbsp;the export destination (this directory is created during application server startup).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;This article applies to Appian 22.3 and later.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed:&amp;nbsp;September 2022&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integration, how-to, plugins&lt;/div&gt;
</description></item><item><title>KB-2215 How to update a custom plug-in using the JavaMail library to use the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library/revision/12</link><pubDate>Tue, 13 Sep 2022 15:24:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>Kevin Kleinegger</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Revision 12 posted to Appian Knowledge Base by Kevin Kleinegger on 9/13/2022 3:24:26 PM&lt;br /&gt;
&lt;h2&gt;&lt;span style="color:#ff0000;font-size:75%;"&gt;** Updated as of 2022-09-13 with updated instructions to avoid Java classloader conflicts&lt;/span&gt;&lt;/h2&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In Appian 22.3, the mail library available for use in custom plug-ins has been updated from JavaMail (&lt;code&gt;javax.mail&lt;/code&gt;) to Jakarta Mail (&lt;code&gt;jakarta.mail&lt;/code&gt;). Custom plug-ins that reference the JavaMail library will need to be updated to use the Jakarta Mail library to continue to work in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;This article outlines how to update a custom plug-in to use the Jakarta Mail library, which requires that import statements in each java class that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;javax.activation&lt;/code&gt; packages to be updated to reference the &lt;code&gt;jakarta.mail&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;Instructions - Gradle&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In the project &lt;/span&gt;&lt;strong&gt;build.gradle&lt;/strong&gt;&lt;span style="font-weight:400;"&gt; file:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure that any &lt;code&gt;javax.mail&lt;/code&gt; and &lt;code&gt;javax.activation&lt;/code&gt; dependencies are removed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Add the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; dependencies as compileOnly dependencies.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;&lt;pre class="ui-code" data-mode="php"&gt;dependencies {
// .... other project dependencies ....

compileOnly &amp;#39;com.sun.mail:jakarta.mail:2.0.1&amp;#39;
compileOnly &amp;#39;com.sun.activation:jakarta.activation:2.0.1&amp;#39;

}&lt;/pre&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;Instructions - Maven&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;In the project &lt;strong&gt;pom.xml&lt;/strong&gt; file:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure that any &lt;code&gt;javax.mail&lt;/code&gt; and &lt;code&gt;javax.activation&lt;/code&gt; dependencies are removed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Add the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; dependencies as system scoped dependencies.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="xml"&gt;&amp;lt;dependencies&amp;gt;
    &amp;lt;!-- .... other project dependencies .... --&amp;gt;
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;com.sun.mail&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;jakarta.mail&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;2.0.1&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;system&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;com.sun.activation&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;jakarta.activation&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;2.0.1&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;system&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
&amp;lt;/dependencies&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;Instructions - Eclipse IDE&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Below are example&amp;nbsp;steps&amp;nbsp;for updating a plug-in project in Eclipse.&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open&amp;nbsp;the existing plug-in project in &lt;/span&gt;Eclipse.&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-11/1016.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the project builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the&amp;nbsp;project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Download the Jakarta Mail and Jakarta Activation JARs&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Download the Jakarta Mail JAR at: &lt;a href="https://repo1.maven.org/maven2/com/sun/mail/jakarta.mail/2.0.1/jakarta.mail-2.0.1.jar"&gt;https://repo1.maven.org/maven2/com/sun/mail/jakarta.mail/2.0.1/jakarta.mail-2.0.1.jar&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Download the Jakarta Activation JAR at: &lt;a href="https://repo1.maven.org/maven2/com/sun/activation/jakarta.activation/2.0.1/jakarta.activation-2.0.1.jar"&gt;https://repo1.maven.org/maven2/com/sun/activation/jakarta.activation/2.0.1/jakarta.activation-2.0.1.jar&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Save these JARs locally in a location outside of the plugin project for use later.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Remove the JavaMail dependency JAR in &lt;/span&gt;&lt;code&gt;META-INF/lib&lt;/code&gt;.
&lt;ol&gt;
&lt;li&gt;Delete the existing javax.mail and/or javax.activation JARs present in&amp;nbsp;&lt;code&gt;&lt;span&gt;META-INF/lib&lt;/span&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;remove&lt;span style="font-weight:400;"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;the JavaMail library JAR&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the Java Build Path to include any new JAR files; otherwise, the project&amp;nbsp;will not build.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation), click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail libraries and click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Add the Jakarta&amp;nbsp;JARs as external dependencies to the project
&lt;ol&gt;
&lt;li&gt;Right-click the project. Click &lt;strong&gt;Properties&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the left navigation, select &lt;strong&gt;Java Build Path&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;Libraries&lt;/strong&gt; tab. Click the &lt;strong&gt;Add External JARs&lt;/strong&gt;&amp;hellip; button.&lt;/li&gt;
&lt;li&gt;Add the&amp;nbsp;Jakarta Mail JAR as an external dependency and click &lt;strong&gt;OK&lt;/strong&gt;.
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;LOCATION_SAVED_EARLIER&amp;gt;/jakarta.mail-2.0.1.jar&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Click the&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Add External JARs&lt;/strong&gt;&lt;span&gt;&amp;hellip; button.&amp;nbsp;&lt;/span&gt;Add the Jakarta Activation JAR as an external dependency and click &lt;strong&gt;OK&lt;/strong&gt;.
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;LOCATION_SAVED_EARLIER&amp;gt;/jakarta.activation-2.0.1.jar&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update any Java classes that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;/code&gt; or&amp;nbsp;&lt;code&gt;javax.activation&lt;/code&gt; packages to use the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&amp;nbsp;&lt;/span&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this library.
&lt;ol&gt;
&lt;li&gt;Example class using &lt;code&gt;javax.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Example class updated to use &lt;code&gt;jakarta.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;b&gt;However, there may be some differences that will require updates to the plug-in beyond the update of the package naming alone.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plug-in version in &lt;/span&gt;&lt;strong&gt;&lt;code&gt;appian-plugin.xml&lt;/code&gt;&lt;/strong&gt;.
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of&amp;nbsp;the plug-in from the existing release that implements the JavaMail library, increment the plug-in version within&lt;strong&gt;&amp;nbsp;appian-plugin.xml.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;As this is a change beyond a simple revision, the minor or major version of the plug-in&amp;nbsp;can be incremented (e.g. &lt;code&gt;&amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;/code&gt; to&amp;nbsp;&lt;code&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/code&gt;).&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated plug-in builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;code&gt;_admin/plugins&lt;/code&gt;&lt;span style="font-weight:400;"&gt; folder of&amp;nbsp;the installation directory for&amp;nbsp;the export destination (this directory is created during application server startup).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;This article applies to Appian 22.3 and later.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed:&amp;nbsp;September 2022&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integration, how-to, plugins&lt;/div&gt;
</description></item><item><title>KB-2215 How to update a custom plug-in using the JavaMail library to use the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library/revision/10</link><pubDate>Wed, 18 May 2022 15:48:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>Elly Meng</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Revision 10 posted to Appian Knowledge Base by Elly Meng on 5/18/2022 3:48:32 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In Appian 22.3, the mail library available for use in custom plug-ins has been updated from JavaMail (&lt;code&gt;javax.mail&lt;/code&gt;) to Jakarta Mail (&lt;code&gt;jakarta.mail&lt;/code&gt;). Custom plug-ins that reference the JavaMail library will need to be updated to use the Jakarta Mail library to continue to work in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;This article outlines how to update a custom plug-in to use the Jakarta Mail library, which requires that import statements in each java class that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;javax.activation&lt;/code&gt; packages to be updated to reference the &lt;code&gt;jakarta.mail&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Below are example&amp;nbsp;steps&amp;nbsp;for updating a plug-in project in Eclipse.&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open&amp;nbsp;the existing plug-in project in &lt;/span&gt;Eclipse.&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0640.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the project builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the&amp;nbsp;project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Replace the JavaMail dependency JAR with the Jakarta Mail JAR in &lt;/span&gt;&lt;code&gt;META-INF/lib&lt;/code&gt;.
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the Jakarta Mail JAR is included within&amp;nbsp;the plug-in.&amp;nbsp;The library that contains the classes used in&amp;nbsp;the plug-in should always be included&amp;nbsp;so that the plug-in uses the same version of the library regardless of which version of Appian it runs in.&amp;nbsp;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;See &lt;a href="https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html"&gt;here&lt;/a&gt; for more details.&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0167.image3.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to &lt;/span&gt;remove&lt;span style="font-weight:400;"&gt; the JavaMail library JAR and &lt;/span&gt;add&lt;span style="font-weight:400;"&gt; the Jakarta Mail library JAR.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the Java Build Path to include any new JAR files; otherwise, the project&amp;nbsp;will not build.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select &lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation), click &lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;Libraries&lt;span style="font-weight:400;"&gt; tab, click &lt;/span&gt;&lt;b&gt;Add JARs&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;Jakarta Mail JAR&lt;/b&gt;&lt;span style="font-weight:400;"&gt; file in&amp;nbsp;the project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail library and click &lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " height="445" src="/resized-image/__size/1999x1180/__key/communityserver-wikis-components-files/00-00-00-00-13/5857.image1.png" width="754" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update any Java classes that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;/code&gt; or&amp;nbsp;&lt;code&gt;javax.activation&lt;/code&gt; packages to use the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&amp;nbsp;&lt;/span&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this library.
&lt;ol&gt;
&lt;li&gt;Example class using &lt;code&gt;javax.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Example class updated to use &lt;code&gt;jakarta.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;b&gt;However, there may be some differences that will require updates to the plug-in beyond the update of the package naming alone.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plug-in version in &lt;code&gt;appian-plugin.xml&lt;/code&gt;&lt;/span&gt;.
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of&amp;nbsp;the plug-in from the existing release that implements the JavaMail library, increment the plug-in version within&amp;nbsp;&lt;code&gt;appian-plugin.xml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;As this is a change beyond a simple revision, the minor or major version of the plug-in&amp;nbsp;can be incremented (e.g. &lt;code&gt;&amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;/code&gt; to&amp;nbsp;&lt;code&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/code&gt;).&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated plug-in builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;_admin/plugins&lt;/b&gt;&lt;span style="font-weight:400;"&gt; folder of&amp;nbsp;the installation directory for&amp;nbsp;the export destination (this directory is created during application server startup).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;This article applies to Appian 22.3 and later.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: May 2022&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integration, how-to, plugins&lt;/div&gt;
</description></item><item><title>KB-2215 How to update a custom plug-in using the JavaMail library to use the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library/revision/11</link><pubDate>Wed, 18 May 2022 15:48:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>Elly Meng</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Revision 11 posted to Appian Knowledge Base by Elly Meng on 5/18/2022 3:48:32 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In Appian 22.3, the mail library available for use in custom plug-ins has been updated from JavaMail (&lt;code&gt;javax.mail&lt;/code&gt;) to Jakarta Mail (&lt;code&gt;jakarta.mail&lt;/code&gt;). Custom plug-ins that reference the JavaMail library will need to be updated to use the Jakarta Mail library to continue to work in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;This article outlines how to update a custom plug-in to use the Jakarta Mail library, which requires that import statements in each java class that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;javax.activation&lt;/code&gt; packages to be updated to reference the &lt;code&gt;jakarta.mail&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Below are example&amp;nbsp;steps&amp;nbsp;for updating a plug-in project in Eclipse.&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open&amp;nbsp;the existing plug-in project in &lt;/span&gt;Eclipse.&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-11/0640.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the project builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the&amp;nbsp;project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Replace the JavaMail dependency JAR with the Jakarta Mail JAR in &lt;/span&gt;&lt;code&gt;META-INF/lib&lt;/code&gt;.
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the Jakarta Mail JAR is included within&amp;nbsp;the plug-in.&amp;nbsp;The library that contains the classes used in&amp;nbsp;the plug-in should always be included&amp;nbsp;so that the plug-in uses the same version of the library regardless of which version of Appian it runs in.&amp;nbsp;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;See &lt;a href="https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html"&gt;here&lt;/a&gt; for more details.&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-11/0167.image3.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to &lt;/span&gt;remove&lt;span style="font-weight:400;"&gt; the JavaMail library JAR and &lt;/span&gt;add&lt;span style="font-weight:400;"&gt; the Jakarta Mail library JAR.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the Java Build Path to include any new JAR files; otherwise, the project&amp;nbsp;will not build.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select &lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation), click &lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;Libraries&lt;span style="font-weight:400;"&gt; tab, click &lt;/span&gt;&lt;b&gt;Add JARs&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;Jakarta Mail JAR&lt;/b&gt;&lt;span style="font-weight:400;"&gt; file in&amp;nbsp;the project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail library and click &lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " height="445" src="/resized-image/__size/1999x1180/__key/communityserver-wikis-components-files/00-00-00-00-11/5857.image1.png" width="754" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update any Java classes that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;/code&gt; or&amp;nbsp;&lt;code&gt;javax.activation&lt;/code&gt; packages to use the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&amp;nbsp;&lt;/span&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this library.
&lt;ol&gt;
&lt;li&gt;Example class using &lt;code&gt;javax.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Example class updated to use &lt;code&gt;jakarta.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;b&gt;However, there may be some differences that will require updates to the plug-in beyond the update of the package naming alone.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plug-in version in &lt;code&gt;appian-plugin.xml&lt;/code&gt;&lt;/span&gt;.
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of&amp;nbsp;the plug-in from the existing release that implements the JavaMail library, increment the plug-in version within&amp;nbsp;&lt;code&gt;appian-plugin.xml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;As this is a change beyond a simple revision, the minor or major version of the plug-in&amp;nbsp;can be incremented (e.g. &lt;code&gt;&amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;/code&gt; to&amp;nbsp;&lt;code&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/code&gt;).&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated plug-in builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;_admin/plugins&lt;/b&gt;&lt;span style="font-weight:400;"&gt; folder of&amp;nbsp;the installation directory for&amp;nbsp;the export destination (this directory is created during application server startup).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;This article applies to Appian 22.3 and later.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: May 2022&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integration, how-to, plugins&lt;/div&gt;
</description></item><item><title>How to update a custom plug-in using the JavaMail library to use the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library/revision/9</link><pubDate>Wed, 18 May 2022 15:42:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>Elly Meng</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Revision 9 posted to Appian Knowledge Base by Elly Meng on 5/18/2022 3:42:51 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In Appian 22.3, the mail library available for use in custom plug-ins has been updated from JavaMail (&lt;code&gt;javax.mail&lt;/code&gt;) to Jakarta Mail (&lt;code&gt;jakarta.mail&lt;/code&gt;). Custom plug-ins that reference the JavaMail library will need to be updated to use the Jakarta Mail library to continue to work in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;This article outlines how to update a custom plug-in to use the Jakarta Mail library, which requires that import statements in each java class that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;javax.activation&lt;/code&gt; packages to be updated to reference the &lt;code&gt;jakarta.mail&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Below are example&amp;nbsp;steps&amp;nbsp;for updating a plug-in project in Eclipse.&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open&amp;nbsp;the existing plug-in project in &lt;/span&gt;Eclipse.&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0640.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the project builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the&amp;nbsp;project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Replace the JavaMail dependency JAR with the Jakarta Mail JAR in &lt;/span&gt;&lt;code&gt;META-INF/lib&lt;/code&gt;.
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the Jakarta Mail JAR is included within&amp;nbsp;the plug-in.&amp;nbsp;The library that contains the classes used in&amp;nbsp;the plug-in should always be included&amp;nbsp;so that the plug-in uses the same version of the library regardless of which version of Appian it runs in.&amp;nbsp;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;See &lt;a href="https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html"&gt;here&lt;/a&gt; for more details.&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0167.image3.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to &lt;/span&gt;remove&lt;span style="font-weight:400;"&gt; the JavaMail library JAR and &lt;/span&gt;add&lt;span style="font-weight:400;"&gt; the Jakarta Mail library JAR.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the Java Build Path to include any new JAR files; otherwise, the project&amp;nbsp;will not build.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select &lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation), click &lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;Libraries&lt;span style="font-weight:400;"&gt; tab, click &lt;/span&gt;&lt;b&gt;Add JARs&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;Jakarta Mail JAR&lt;/b&gt;&lt;span style="font-weight:400;"&gt; file in&amp;nbsp;the project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail library and click &lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " height="445" src="/resized-image/__size/1999x1180/__key/communityserver-wikis-components-files/00-00-00-00-13/5857.image1.png" width="754" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update any Java classes that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;/code&gt; or&amp;nbsp;&lt;code&gt;javax.activation&lt;/code&gt; packages to use the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&amp;nbsp;&lt;/span&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this library.
&lt;ol&gt;
&lt;li&gt;Example class using &lt;code&gt;javax.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Example class updated to use &lt;code&gt;jakarta.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;b&gt;However, there may be some differences that will require updates to the plug-in beyond the update of the package naming alone.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plug-in version in &lt;code&gt;appian-plugin.xml&lt;/code&gt;&lt;/span&gt;.
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of&amp;nbsp;the plug-in from the existing release that implements the JavaMail library, increment the plug-in version within&amp;nbsp;&lt;code&gt;appian-plugin.xml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;As this is a change beyond a simple revision, the minor or major version of the plug-in&amp;nbsp;can be incremented (e.g. &lt;code&gt;&amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;/code&gt; to&amp;nbsp;&lt;code&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/code&gt;).&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated plug-in builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;_admin/plugins&lt;/b&gt;&lt;span style="font-weight:400;"&gt; folder of&amp;nbsp;the installation directory for&amp;nbsp;the export destination (this directory is created during application server startup).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;This article applies to Appian 22.3 and later.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: May 2022&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>How to update a custom plug-in using the JavaMail library to use the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library/revision/8</link><pubDate>Wed, 18 May 2022 15:42:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>Elly Meng</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Revision 8 posted to Appian Knowledge Base by Elly Meng on 5/18/2022 3:42:32 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In Appian 22.3, the mail library available for use in custom plug-ins has been updated from JavaMail (&lt;code&gt;javax.mail&lt;/code&gt;) to Jakarta Mail (&lt;code&gt;jakarta.mail&lt;/code&gt;). Custom plug-ins that reference the JavaMail library will need to be updated to use the Jakarta Mail library to continue to work in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;This article outlines how to update a custom plug-in to use the Jakarta Mail library, which requires that import statements in each java class that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;javax.activation&lt;/code&gt; packages to be updated to reference the &lt;code&gt;jakarta.mail&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Below are example&amp;nbsp;steps&amp;nbsp;for updating a plug-in project in Eclipse.&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open&amp;nbsp;the existing plug-in project in &lt;/span&gt;Eclipse.&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0640.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the project builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the&amp;nbsp;project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Replace the JavaMail dependency JAR with the Jakarta Mail JAR in &lt;/span&gt;&lt;code&gt;META-INF/lib&lt;/code&gt;.
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the Jakarta Mail JAR is included within&amp;nbsp;the plug-in.&amp;nbsp;The library that contains the classes used in&amp;nbsp;the plug-in should always be included&amp;nbsp;so that the plug-in uses the same version of the library regardless of which version of Appian it runs in.&amp;nbsp;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;See &lt;a href="https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html"&gt;here&lt;/a&gt; for more details.&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0167.image3.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to &lt;/span&gt;remove&lt;span style="font-weight:400;"&gt; the JavaMail library JAR and &lt;/span&gt;add&lt;span style="font-weight:400;"&gt; the Jakarta Mail library JAR.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the Java Build Path to include any new JAR files; otherwise, the project&amp;nbsp;will not build.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select &lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation), click &lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;Libraries&lt;span style="font-weight:400;"&gt; tab, click &lt;/span&gt;&lt;b&gt;Add JARs&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;Jakarta Mail JAR&lt;/b&gt;&lt;span style="font-weight:400;"&gt; file in&amp;nbsp;the project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail library and click &lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " height="445" src="/resized-image/__size/1999x1180/__key/communityserver-wikis-components-files/00-00-00-00-13/5857.image1.png" width="754" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update any Java classes that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;/code&gt; or&amp;nbsp;&lt;code&gt;javax.activation&lt;/code&gt; packages to use the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&amp;nbsp;&lt;/span&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this library.
&lt;ol&gt;
&lt;li&gt;Example class using &lt;code&gt;javax.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Example class updated to use &lt;code&gt;jakarta.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;b&gt;However, there may be some differences that will require updates to the plug-in beyond the update of the package naming alone.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plug-in version in &lt;code&gt;appian-plugin.xml&lt;/code&gt;&lt;/span&gt;.
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of&amp;nbsp;the plug-in from the existing release that implements the JavaMail library, increment the plug-in version within&amp;nbsp;&lt;code&gt;appian-plugin.xml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;As this is a change beyond a simple revision, the minor or major version of the plug-in&amp;nbsp;can be incremented (e.g. &lt;code&gt;&amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;/code&gt; to&amp;nbsp;&lt;code&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/code&gt;).&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated plug-in builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;_admin/plugins&lt;/b&gt;&lt;span style="font-weight:400;"&gt; folder of&amp;nbsp;the installation directory for&amp;nbsp;the export destination (this directory is created during application server startup).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;This article applies to Appian 22.3 and later.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: May 2022&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>How to migrate a Custom Plug-in using the JavaMail library to use the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library/revision/7</link><pubDate>Wed, 18 May 2022 15:40:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>Elly Meng</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Revision 7 posted to Appian Knowledge Base by Elly Meng on 5/18/2022 3:40:47 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In Appian 22.3, the mail library available for use in custom plug-ins has been updated from JavaMail (&lt;code&gt;javax.mail&lt;/code&gt;) to Jakarta Mail (&lt;code&gt;jakarta.mail&lt;/code&gt;). Custom plug-ins that reference the JavaMail library will need to be updated to use the Jakarta Mail library to continue to work in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;This article outlines how to update a custom plug-in to use the Jakarta Mail library, which requires that import statements in each java class that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;javax.activation&lt;/code&gt; packages to be updated to reference the &lt;code&gt;jakarta.mail&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Below are example&amp;nbsp;steps&amp;nbsp;for updating a plug-in project in Eclipse.&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open&amp;nbsp;the existing plug-in project in &lt;/span&gt;Eclipse.&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0640.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the project builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the&amp;nbsp;project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Replace the JavaMail dependency JAR with the Jakarta Mail JAR in &lt;/span&gt;&lt;code&gt;META-INF/lib&lt;/code&gt;.
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the Jakarta Mail JAR is included within&amp;nbsp;the plug-in.&amp;nbsp;The library that contains the classes used in&amp;nbsp;the plug-in should always be included&amp;nbsp;so that the plug-in uses the same version of the library regardless of which version of Appian it runs in.&amp;nbsp;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;See &lt;a href="https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html"&gt;here&lt;/a&gt; for more details.&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0167.image3.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to &lt;/span&gt;remove&lt;span style="font-weight:400;"&gt; the JavaMail library JAR and &lt;/span&gt;add&lt;span style="font-weight:400;"&gt; the Jakarta Mail library JAR.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the Java Build Path to include any new JAR files; otherwise, the project&amp;nbsp;will not build.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select &lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation), click &lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;Libraries&lt;span style="font-weight:400;"&gt; tab, click &lt;/span&gt;&lt;b&gt;Add JARs&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;Jakarta Mail JAR&lt;/b&gt;&lt;span style="font-weight:400;"&gt; file in&amp;nbsp;the project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail library and click &lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " height="445" src="/resized-image/__size/1999x1180/__key/communityserver-wikis-components-files/00-00-00-00-13/5857.image1.png" width="754" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update any Java classes that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;/code&gt; or&amp;nbsp;&lt;code&gt;javax.activation&lt;/code&gt; packages to use the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&amp;nbsp;&lt;/span&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this library.
&lt;ol&gt;
&lt;li&gt;Example class using &lt;code&gt;javax.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Example class updated to use &lt;code&gt;jakarta.mail&lt;/code&gt;:&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;b&gt;However, there may be some differences that will require updates to the plug-in beyond the update of the package naming alone.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plug-in version in &lt;code&gt;appian-plugin.xml&lt;/code&gt;&lt;/span&gt;.
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of&amp;nbsp;the plug-in from the existing release that implements the JavaMail library, increment the plug-in version within&amp;nbsp;&lt;code&gt;appian-plugin.xml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;As this is a change beyond a simple revision, the minor or major version of the plug-in&amp;nbsp;can be incremented (e.g. &lt;code&gt;&amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;/code&gt; to&amp;nbsp;&lt;code&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/code&gt;).&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated plug-in builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;_admin/plugins&lt;/b&gt;&lt;span style="font-weight:400;"&gt; folder of&amp;nbsp;the installation directory for&amp;nbsp;the export destination (this directory is created during application server startup).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;This article applies to Appian 22.3 and later.&lt;/span&gt;&lt;/p&gt;
&lt;div class="content"&gt;
&lt;p&gt;Last Reviewed: May 2022&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>How to migrate a Custom Plug-in using the JavaMail library to use the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library/revision/6</link><pubDate>Wed, 18 May 2022 15:37:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>Elly Meng</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Revision 6 posted to Appian Knowledge Base by Elly Meng on 5/18/2022 3:37:38 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In Appian 22.3, the mail library available for use in custom plug-ins has been updated from JavaMail (&lt;code&gt;javax.mail&lt;/code&gt;) to Jakarta Mail (&lt;code&gt;jakarta.mail&lt;/code&gt;). Custom plug-ins that reference the JavaMail library will need to be updated to use the Jakarta Mail library to continue to work in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;This article outlines how to update a custom plug-in to use the Jakarta Mail library, which requires that import statements in each java class that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;span style="font-family:Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;javax.activation&lt;/code&gt; packages to be updated to reference the &lt;code&gt;jakarta.mail&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Below are example&amp;nbsp;steps&amp;nbsp;for updating a plug-in project in Eclipse.&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open&amp;nbsp;the existing plug-in project in &lt;/span&gt;Eclipse.&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0640.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the project builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the&amp;nbsp;project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Replace the JavaMail dependency JAR with the Jakarta Mail JAR in &lt;/span&gt;&lt;code&gt;META-INF/lib.&lt;/code&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the Jakarta Mail JAR is included within&amp;nbsp;the plug-in.&amp;nbsp;The library that contains the classes used in&amp;nbsp;the plug-in should always be included&amp;nbsp;so that the plug-in uses the same version of the library regardless of which version of Appian it runs in.&amp;nbsp;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;See &lt;a href="https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html"&gt;here&lt;/a&gt; for more details.&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0167.image3.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to &lt;/span&gt;remove&lt;span style="font-weight:400;"&gt; the JavaMail library JAR and &lt;/span&gt;add&lt;span style="font-weight:400;"&gt; the Jakarta Mail library JAR.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the Java Build Path to include any new JAR files; otherwise, the project&amp;nbsp;will not build.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select &lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation), click &lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;Libraries&lt;span style="font-weight:400;"&gt; tab, click &lt;/span&gt;&lt;b&gt;Add JARs&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;Jakarta Mail JAR&lt;/b&gt;&lt;span style="font-weight:400;"&gt; file in&amp;nbsp;the project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail library and click &lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " height="445" src="/resized-image/__size/1999x1180/__key/communityserver-wikis-components-files/00-00-00-00-13/5857.image1.png" width="754" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update any Java classes that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;/code&gt; or&amp;nbsp;&lt;code&gt;javax.activation&lt;/code&gt; packages to use the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; packages respectively.&amp;nbsp;&lt;/span&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this library.
&lt;ol&gt;
&lt;li&gt;Example class using &lt;code&gt;javax.mail&lt;/code&gt;&lt;b&gt;:&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Example class updated to use &lt;code&gt;jakarta.mail&lt;/code&gt;&lt;b&gt;:&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;b&gt;However, there may be some differences that will require updates to the plug-in beyond the update of the package naming alone.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plug-in version in &lt;code&gt;appian-plugin.xml.&lt;/code&gt;&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of&amp;nbsp;the plug-in from the existing release that implements the JavaMail library, increment the plug-in version within&amp;nbsp;&lt;code&gt;appian-plugin.xml.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;As this is a change beyond a simple revision, the minor or major version of the plug-in&amp;nbsp;can be incremented (e.g. &amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt; to&amp;nbsp;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;).&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated plug-in builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click&amp;nbsp;the project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In&amp;nbsp;the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;_admin/plugins&lt;/b&gt;&lt;span style="font-weight:400;"&gt; folder of&amp;nbsp;the installation directory for&amp;nbsp;the export destination (this directory is created during application server startup).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;span&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;This article applies to Appian 22.3 and later.&lt;/span&gt;&lt;/p&gt;
&lt;div class="content"&gt;
&lt;p&gt;Last Reviewed: May 2022&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>DRAFT: Migrating a Custom Plug-in using the JavaMail library to use the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library/revision/5</link><pubDate>Tue, 17 May 2022 01:06:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>Tom Ryan</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Revision 5 posted to Appian Knowledge Base by Tom Ryan on 5/17/2022 1:06:45 AM&lt;br /&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In Appian 22.3, the mail library available for use in custom plug-ins has been updated from JavaMail (&lt;code&gt;javax.mail&lt;/code&gt;) to Jakarta Mail (&lt;code&gt;jakarta.mail&lt;/code&gt;). Custom plug-ins that reference the JavaMail library will need to be updated to use the Jakarta Mail library to continue to work in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The update to use the Jakarta Mail library requires import statements in each java class that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;/code&gt; package and the&amp;nbsp;&lt;code&gt;javax.activation&lt;/code&gt; package to be updated to reference the &lt;code&gt;jakarta.mail&lt;/code&gt; package and the &lt;code&gt;jakarta.activation&lt;/code&gt; package respectively.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Example steps to update a plug-in project in Eclipse:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open your existing plug-in project in &lt;/span&gt;&lt;b&gt;Eclipse&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0640.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the project builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click your project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Replace the JavaMail dependency JAR with the Jakarta Mail JAR in &lt;/span&gt;&lt;b&gt;META-INF/lib&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure you include the Jakarta Mail JAR within your plug-in. You should always include the library that contains the classes used in your plug-in so that the plug-in uses the same version of the library regardless of which version of Appian it runs in.&amp;nbsp;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;See:&lt;a href="https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html" rel="noopener noreferrer" target="_blank"&gt; https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html&lt;/a&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0167.image3.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to &lt;/span&gt;&lt;b&gt;remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt; the JavaMail library JAR and &lt;/span&gt;&lt;b&gt;add&lt;/b&gt;&lt;span style="font-weight:400;"&gt; the Jakarta Mail library JAR.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update your Java Build Path to include any new JAR files; otherwise, the project won&amp;#39;t build.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select &lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation) click &lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Libraries&lt;/b&gt;&lt;span style="font-weight:400;"&gt; tab, click &lt;/span&gt;&lt;b&gt;Add JARs&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;Jakarta Mail JAR&lt;/b&gt;&lt;span style="font-weight:400;"&gt; file in your project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail library and click &lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " height="445" src="/resized-image/__size/1999x1180/__key/communityserver-wikis-components-files/00-00-00-00-13/5857.image1.png" width="754" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update any Java classes that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;/code&gt; or&amp;nbsp;&lt;code&gt;javax.activation&lt;/code&gt; packages to use the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; packages.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this same library. As such, we need to update the classes in the project to use the &lt;code&gt;jakarta.mail&lt;/code&gt; package instead of the &lt;code&gt;javax.mail&lt;/code&gt; package and the &lt;code&gt;jakarta.activation&lt;/code&gt; package instead of the &lt;code&gt;javax.activation&lt;/code&gt; package.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example class using &lt;code&gt;javax.mail&lt;/code&gt;:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example class updated to use &lt;code&gt;jakarta.mail&lt;/code&gt;: &lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;b&gt;However, there may be some differences that will require updates to your plug-in beyond the update of the package naming alone.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plug-in version in &lt;code&gt;appian-plugin.xml&lt;/code&gt;.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of your plug-in from the existing release that implements the JavaMail library, you should increment the version of this plug-in within the &lt;code&gt;appian-plugin.xml&lt;/code&gt; file.
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Example current version:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example new version:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;As this is a change beyond a simple revision, you may wish to increment the minor or major version of the plug-in.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated plug-in builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click your project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;_admin/plugins&lt;/b&gt;&lt;span style="font-weight:400;"&gt; folder of your installation directory for your export destination. - This directory is created during application server startup.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>DRAFT: Migrating a Custom Plugin using the JavaMail library to the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library/revision/4</link><pubDate>Tue, 17 May 2022 01:04:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>Tom Ryan</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Revision 4 posted to Appian Knowledge Base by Tom Ryan on 5/17/2022 1:04:30 AM&lt;br /&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In Appian 22.3, the mail library available for use in custom plug-ins has been updated from JavaMail (&lt;code&gt;javax.mail&lt;/code&gt;) to Jakarta Mail (&lt;code&gt;jakarta.mail&lt;/code&gt;). Custom plug-ins that reference the JavaMail library will need to be updated to use the Jakarta Mail library to continue to work in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;For custom plug-ins that reference the JavaMail library, the update to use the Jakarta Mail library requires the update of the import statements in each java class to move from the use of the &lt;code&gt;javax.mail&lt;/code&gt; package to the &lt;code&gt;jakarta.mail&lt;/code&gt; package, and from the &lt;code&gt;javax.activation&lt;/code&gt; package to the &lt;code&gt;jakarta.activation&lt;/code&gt; package.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Example steps to update a plug-in project in Eclipse:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open your existing plug-in project in &lt;/span&gt;&lt;b&gt;Eclipse&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0640.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the project builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click your project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Replace the JavaMail dependency JAR with the Jakarta Mail JAR in &lt;/span&gt;&lt;b&gt;META-INF/lib&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure you include the Jakarta Mail JAR within your plug-in. You should always include the library that contains the classes used in your plug-in so that the plug-in uses the same version of the library regardless of which version of Appian it runs in.&amp;nbsp;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;See:&lt;a href="https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html" rel="noopener noreferrer" target="_blank"&gt; https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html&lt;/a&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0167.image3.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to &lt;/span&gt;&lt;b&gt;remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt; the JavaMail library JAR and &lt;/span&gt;&lt;b&gt;add&lt;/b&gt;&lt;span style="font-weight:400;"&gt; the Jakarta Mail library JAR.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update your Java Build Path to include any new JAR files; otherwise, the project won&amp;#39;t build.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select &lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation) click &lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Libraries&lt;/b&gt;&lt;span style="font-weight:400;"&gt; tab, click &lt;/span&gt;&lt;b&gt;Add JARs&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;Jakarta Mail JAR&lt;/b&gt;&lt;span style="font-weight:400;"&gt; file in your project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail library and click &lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " height="445" src="/resized-image/__size/1999x1180/__key/communityserver-wikis-components-files/00-00-00-00-13/5857.image1.png" width="754" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update any Java classes that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;/code&gt; or&amp;nbsp;&lt;code&gt;javax.activation&lt;/code&gt; packages to use the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; packages.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this same library. As such, we need to update the classes in the project to use the &lt;code&gt;jakarta.mail&lt;/code&gt; package instead of the &lt;code&gt;javax.mail&lt;/code&gt; package and the &lt;code&gt;jakarta.activation&lt;/code&gt; package instead of the &lt;code&gt;javax.activation&lt;/code&gt; package.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example class using &lt;code&gt;javax.mail&lt;/code&gt;:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example class updated to use &lt;code&gt;jakarta.mail&lt;/code&gt;: &lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;b&gt;However, there may be some differences that will require updates to your plug-in beyond the update of the package naming alone.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plug-in version in &lt;code&gt;appian-plugin.xml&lt;/code&gt;.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of your plug-in from the existing release that implements the JavaMail library, you should increment the version of this plug-in within the &lt;code&gt;appian-plugin.xml&lt;/code&gt; file.
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Example current version:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example new version:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;As this is a change beyond a simple revision, you may wish to increment the minor or major version of the plug-in.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated plug-in builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click your project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;_admin/plugins&lt;/b&gt;&lt;span style="font-weight:400;"&gt; folder of your installation directory for your export destination. - This directory is created during application server startup.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>DRAFT: Migrating a Custom Plugin using the JavaMail library to the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library/revision/3</link><pubDate>Tue, 17 May 2022 01:03:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>Tom Ryan</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Revision 3 posted to Appian Knowledge Base by Tom Ryan on 5/17/2022 1:03:56 AM&lt;br /&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In Appian 22.3, the mail library available for use in custom plug-ins has been updated from JavaMail (javax.mail) to Jakarta Mail (jakarta.mail). Custom plug-ins that reference the JavaMail library will need to be updated to use the Jakarta Mail library to continue to work in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;For custom plug-ins that reference the JavaMail library, the update to use the Jakarta Mail library requires the update of the import statements in each java class to move from the use of the &lt;code&gt;javax.mail&lt;/code&gt; package to the &lt;code&gt;jakarta.mail&lt;/code&gt; package, and from the &lt;code&gt;javax.activation&lt;/code&gt; package to the &lt;code&gt;jakarta.activation&lt;/code&gt; package.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Example steps to update a plug-in project in Eclipse:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open your existing plug-in project in &lt;/span&gt;&lt;b&gt;Eclipse&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0640.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the project builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click your project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Replace the JavaMail dependency JAR with the Jakarta Mail JAR in &lt;/span&gt;&lt;b&gt;META-INF/lib&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure you include the Jakarta Mail JAR within your plug-in. You should always include the library that contains the classes used in your plug-in so that the plug-in uses the same version of the library regardless of which version of Appian it runs in.&amp;nbsp;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;See:&lt;a href="https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html" rel="noopener noreferrer" target="_blank"&gt; https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html&lt;/a&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0167.image3.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to &lt;/span&gt;&lt;b&gt;remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt; the JavaMail library JAR and &lt;/span&gt;&lt;b&gt;add&lt;/b&gt;&lt;span style="font-weight:400;"&gt; the Jakarta Mail library JAR.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update your Java Build Path to include any new JAR files; otherwise, the project won&amp;#39;t build.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select &lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation) click &lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Libraries&lt;/b&gt;&lt;span style="font-weight:400;"&gt; tab, click &lt;/span&gt;&lt;b&gt;Add JARs&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;Jakarta Mail JAR&lt;/b&gt;&lt;span style="font-weight:400;"&gt; file in your project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail library and click &lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " height="445" src="/resized-image/__size/1999x1180/__key/communityserver-wikis-components-files/00-00-00-00-13/5857.image1.png" width="754" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update any Java classes that reference the&amp;nbsp;&lt;code&gt;javax.mail&lt;/code&gt; or&amp;nbsp;&lt;code&gt;javax.activation&lt;/code&gt; packages to use the &lt;code&gt;jakarta.mail&lt;/code&gt; and &lt;code&gt;jakarta.activation&lt;/code&gt; packages.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this same library. As such, we need to update the classes in the project to use the &lt;code&gt;jakarta.mail&lt;/code&gt; package instead of the &lt;code&gt;javax.mail&lt;/code&gt; package and the &lt;code&gt;jakarta.activation&lt;/code&gt; package instead of the &lt;code&gt;javax.activation&lt;/code&gt; package.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example class using &lt;code&gt;javax.mail&lt;/code&gt;:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example class updated to use &lt;code&gt;jakarta.mail&lt;/code&gt;: &lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;b&gt;However, there may be some differences that will require updates to your plug-in beyond the update of the package naming alone.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plug-in version in &lt;code&gt;appian-plugin.xml&lt;/code&gt;.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of your plug-in from the existing release that implements the JavaMail library, you should increment the version of this plug-in within the &lt;code&gt;appian-plugin.xml&lt;/code&gt; file.
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Example current version:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example new version:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;As this is a change beyond a simple revision, you may wish to increment the minor or major version of the plug-in.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated plug-in builds successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click your project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;_admin/plugins&lt;/b&gt;&lt;span style="font-weight:400;"&gt; folder of your installation directory for your export destination. - This directory is created during application server startup.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>DRAFT: Migrating a Custom Plugin using the JavaMail library to the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library/revision/2</link><pubDate>Wed, 11 May 2022 04:35:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>chase.putnam</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Revision 2 posted to Appian Knowledge Base by chase.putnam on 5/11/2022 4:35:18 AM&lt;br /&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Please note that Appian 22.3+ uses the Jakarta Mail library. Appian versions prior to this use the JavaMail library.&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Appian is deprecating the use of the JavaMail (javax.mail) library in Appian 22.2 for replacement with the modern Jakarta Mail (jakarta.mail) library in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The Jakarta Mail library is a set of abstract APIs that model a mail system. (Jakarta Mail was previously known as JavaMail before migration into the Apache Foundation.) The library provides a platform independent and protocol independent framework to build Java technology based email client applications.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;For many of the custom plugins implementing the JavaMail library, the update to use the Jakarta Mail library requires the update of the import statements in each java class to move from the use of &amp;lsquo;javax.mail&amp;rsquo; to the &amp;lsquo;jakarta.mail&amp;rsquo; package and the &amp;lsquo;javax.activation&amp;rsquo; to the &amp;lsquo;jakarta.activation&amp;rsquo; package in order to use the new library appropriately.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Steps:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open your existing plugin project in &lt;/span&gt;&lt;b&gt;Eclipse&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0640.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the current code base compiles successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click your project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Replace the JavaMail dependency JAR with the Jakarta Mail JAR in &lt;/span&gt;&lt;b&gt;META-INF/lib&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;i&gt;&lt;span style="font-weight:400;"&gt;(If your plugin is not importing a self-contained dependency JAR and is using a dependency inherited from the Appian product, please ensure you include the Jakarta Mail JAR within your plugin. You should always include the library that contains the classes used in your plug-in so that the plug-in uses the same version of the library regardless of which version of Appian it runs in.&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style="font-weight:400;"&gt;See:&lt;a href="https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html" rel="noopener noreferrer" target="_blank"&gt; https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-weight:400;"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0167.image3.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to &lt;/span&gt;&lt;b&gt;remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt; the JavaMail library JAR and &lt;/span&gt;&lt;b&gt;add&lt;/b&gt;&lt;span style="font-weight:400;"&gt; the Jakarta Mail library JAR.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update your Java Build Path to include any new JAR files; otherwise, Eclipse won&amp;#39;t compile.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select &lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation) click &lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Libraries&lt;/b&gt;&lt;span style="font-weight:400;"&gt; tab, click &lt;/span&gt;&lt;b&gt;Add JARs&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;Jakarta Mail JAR&lt;/b&gt;&lt;span style="font-weight:400;"&gt; file in your project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail library and click &lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " height="445" src="/resized-image/__size/1999x1180/__key/communityserver-wikis-components-files/00-00-00-00-13/5857.image1.png" width="754" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update Java classes to use the jakarta.mail and jakarta.activation packages.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this same library. As such, we need to update the classes in the project to use the &amp;lsquo;jakarta.mail&amp;rsquo; package instead of the &amp;lsquo;javax.mail&amp;rsquo; package and the &amp;lsquo;jakarta.activation&amp;rsquo; package instead of the &amp;lsquo;javax.activation&amp;rsquo; package.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example class using javax.mail:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example class updated to use jakarta.mail: &lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;(&lt;i&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;/i&gt;&lt;b&gt;&lt;i&gt;However, there may be some differences that will require updates to your plugin code base beyond the update of the package naming alone.&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="font-weight:400;"&gt;)&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plugin version in appian-plugin.xml.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of your plugin from the existing release that implements the JavaMail library, you should increment the version of this plugin within the appian-plugin.xml file.
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Example current version:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example new version:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;span style="font-weight:400;"&gt;(As this is a change beyond a simple revision, you may wish to increment the minor or major version of the plugin.)&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated code base compiles successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click your project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;_admin/plugins&lt;/b&gt;&lt;span style="font-weight:400;"&gt; folder of your installation directory for your export destination. - This directory is created during application server startup.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>DRAFT: Migrating a Custom Plugin using the JavaMail library to the Jakarta Mail library</title><link>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library/revision/1</link><pubDate>Wed, 11 May 2022 04:28:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82e71fa4-8bed-4e6a-bb90-6b4f39cc1a43</guid><dc:creator>chase.putnam</dc:creator><comments>https://community.appian.com/support/w/kb/2632/kb-2215-how-to-update-a-custom-plug-in-using-the-javamail-library-to-use-the-jakarta-mail-library#comments</comments><description>Revision 1 posted to Appian Knowledge Base by chase.putnam on 5/11/2022 4:28:04 AM&lt;br /&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Please note that Appian 22.3+ uses the Jakarta Mail library. Appian versions prior to this use the JavaMail library.&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Appian is deprecating the use of the JavaMail (javax.mail) library in Appian 22.2 for replacement with the modern Jakarta Mail (jakarta.mail) library in Appian 22.3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The Jakarta Mail library is a set of abstract APIs that model a mail system. (Jakarta Mail was previously known as JavaMail before migration into the Apache Foundation.) The library provides a platform independent and protocol independent framework to build Java technology based email client applications.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;For many of the custom plugins implementing the JavaMail library, the update to use the Jakarta Mail library requires the update of the import statements in each java class to move from the use of &amp;lsquo;javax.mail&amp;rsquo; to the &amp;lsquo;jakarta.mail&amp;rsquo; package and the &amp;lsquo;javax.activation&amp;rsquo; to the &amp;lsquo;jakarta.activation&amp;rsquo; package in order to use the new library appropriately.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Steps:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Open your existing plugin project in &lt;/span&gt;&lt;b&gt;Eclipse&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0640.image2.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the current code base compiles successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click your project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select a destination directory for the export.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Replace the JavaMail dependency JAR with the Jakarta Mail JAR in &lt;/span&gt;&lt;b&gt;META-INF/lib&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;i&gt;&lt;span style="font-weight:400;"&gt;(If your plugin is not importing a self-contained dependency JAR and is using a dependency inherited from the Appian product, please ensure you include the Jakarta Mail JAR within your plugin. You should always include the library that contains the classes used in your plug-in so that the plug-in uses the same version of the library regardless of which version of Appian it runs in.&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style="font-weight:400;"&gt;See:&lt;a href="https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html" rel="noopener noreferrer" target="_blank"&gt; https://docs.appian.com/suite/help/latest/Custom_Plug-in_Packages.html&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-weight:400;"&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-13/0167.image3.png" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update the build path to &lt;/span&gt;&lt;b&gt;remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt; the JavaMail library JAR and &lt;/span&gt;&lt;b&gt;add&lt;/b&gt;&lt;span style="font-weight:400;"&gt; the Jakarta Mail library JAR.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update your Java Build Path to include any new JAR files; otherwise, Eclipse won&amp;#39;t compile.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click the project and select &lt;/span&gt;&lt;b&gt;Properties&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In the Package Explorer (left navigation) click &lt;/span&gt;&lt;b&gt;Java Build Path&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Libraries&lt;/b&gt;&lt;span style="font-weight:400;"&gt; tab, click &lt;/span&gt;&lt;b&gt;Add JARs&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;Jakarta Mail JAR&lt;/b&gt;&lt;span style="font-weight:400;"&gt; file in your project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the existing JavaMail library and click &lt;/span&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " height="445" src="/resized-image/__size/1999x1180/__key/communityserver-wikis-components-files/00-00-00-00-13/5857.image1.png" width="754" /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Update Java classes to use the jakarta.mail and jakarta.activation packages.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;The Jakarta Mail library implements the same classes as the JavaMail library because Jakarta is the updated version of this same library. As such, we need to update the classes in the project to use the &amp;lsquo;jakarta.mail&amp;rsquo; package instead of the &amp;lsquo;javax.mail&amp;rsquo; package and the &amp;lsquo;jakarta.activation&amp;rsquo; package instead of the &amp;lsquo;javax.activation&amp;rsquo; package.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example class using javax.mail:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import javax.mail.Authenticator;

import javax.mail.Message;

import javax.mail.PasswordAuthentication;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;



import org.apache.log4j.Logger;&lt;/pre&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example class updated to use jakarta.mail: &lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;package com.appiancorp.plugins.example.mail;



import java.util.Date;

import java.util.Properties;



import jakarta.mail.Authenticator;

import jakarta.mail.Message;

import jakarta.mail.PasswordAuthentication;

import jakarta.mail.Session;

import jakarta.mail.Transport;

import jakarta.mail.internet.InternetAddress;

import jakarta.mail.internet.MimeMessage;



import org.apache.log4j.Logger;

&lt;/pre&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;(&lt;i&gt;&lt;span style="font-weight:400;"&gt;The updated classes and methods from the Jakarta Mail library will typically implement the same parameters and logic as the JavaMail equivalents. &lt;/span&gt;&lt;/i&gt;&lt;b&gt;&lt;i&gt;However, there may be some differences that will require updates to your plugin code base beyond the update of the package naming alone.&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="font-weight:400;"&gt;)&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Increment the plugin version in appian-plugin.xml.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;In order to differentiate this latest version of your plugin from the existing release that implements the JavaMail library, you should increment the version of this plugin within the appian-plugin.xml file.
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Example current version:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Example new version:&lt;/b&gt;
&lt;ol&gt;
&lt;li&gt;&amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;span style="font-weight:400;"&gt;(As this is a change beyond a simple revision, you may wish to increment the minor or major version of the plugin.)&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Ensure the updated code base compiles successfully.&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Right click your project and click &lt;/span&gt;&lt;b&gt;Export&amp;hellip;.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;JAR file&lt;/b&gt;&lt;span style="font-weight:400;"&gt; option as the &lt;/span&gt;&lt;b&gt;Export&lt;/b&gt; &lt;b&gt;destination&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;On the &lt;/span&gt;&lt;b&gt;Resources to export&lt;/b&gt;&lt;span style="font-weight:400;"&gt; dialog, clear the &lt;/span&gt;&lt;b&gt;.classpath&lt;/b&gt;&lt;span style="font-weight:400;"&gt; and &lt;/span&gt;&lt;b&gt;.project&lt;/b&gt;&lt;span style="font-weight:400;"&gt; selections as these files are used exclusively by Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Select the &lt;/span&gt;&lt;b&gt;_admin/plugins&lt;/b&gt;&lt;span style="font-weight:400;"&gt; folder of your installation directory for your export destination. - This directory is created during application server startup.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Click &lt;/span&gt;&lt;b&gt;Finish&lt;/b&gt;&lt;span style="font-weight:400;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>