WAS v8.5 > Deploy applications > Deploy client applications > Deploy a Java EE client application > Deploy a Java EE client applicationConfigure mail providers and sessions for application clients
We can edit the configurations of mail sessions and providers for the application clients using the Application Client Resource Configuration Tool (ACRCT).
Use the Application Client Resource Configuration Tool (ACRCT) to edit the configurations of mail sessions and providers for the application clients to use.
- Start the ACRCT.
- Open an EAR file.
- Locate the mail objects in the tree that is displayed for the EAR file. For example, if your file contains mail sessions, expand Resources > application.jar > Mail Providers > java_mail_provider_instance > Mail Sessions.
In this example, java_mail_provider_instance is a particular mail provider.
Results
The mail session instances are located in the JavaMail Sessions folder.
Example
We can configure mail provider and mail session settings.
The following code examples illustrates how to configure mail provider and mail session settings for application clients:
<resources.mail:MailProvider xmi:id="builtin_mailprovider" name="Built-in Mail Provider" description="The built-in mail provider"> <factories xmi:type="resources.mail:MailSession" xmi:id="MailSession_1207766754834" name="MailSession" jndiName="mail/session" description="Sample mail session" category="Sample" mailTransportHost="smtp.coldmail.com" mailTransportUser="transportUser" mailTransportPassword="{xor}Lz4sLChvLTs=" mailFrom="smith@coldmail.com" mailStoreHost="imap.coldmail.com" mailStoreUser="storeUser" mailStorePassword="{xor}Lz4sLChvLTs=" debug="true" strict="true" mailTransportProtocol="builtin_smtp" mailStoreProtocol="builtin_imap"> <propertySet xmi:id="J2EEResourcePropertySet_1207766778585"> <resourceProperties xmi:id="J2EEResourceProperty_1207766778585" name="key" type="java.lang.String" value="value" required="false"/> </propertySet> </factories> <protocolProviders xmi:id="builtin_smtp" protocol="smtp" classname="com.sun.mail.smtp.SMTPTransport" type="TRANSPORT"/> <protocolProviders xmi:id="builtin_pop3" protocol="pop3" classname="com.sun.mail.pop3.POP3Store" type="STORE"/> <protocolProviders xmi:id="builtin_imap" protocol="imap" classname="com.sun.mail.imap.IMAPStore" type="STORE"/> <protocolProviders xmi:id="builtin_smtps" protocol="smtps" classname="com.sun.mail.smtp.SMTPSSLTransport" type="TRANSPORT"/> <protocolProviders xmi:id="builtin_pop3s" protocol="pop3s" classname="com.sun.mail.pop3.POP3SSLStore" type="STORE"/> <protocolProviders xmi:id="builtin_imaps" protocol="imaps" classname="com.sun.mail.imap.IMAPSSLStore" type="STORE"/> </resources.mail:MailProvider>
- Required fields:
- Mail Provider Properties page: name, and at least one protocol provider
- Mail Session Properties page: name, jndiName, outgoing server and protocol, and/or incoming server and protocol
- Special cases:
- If we use the ACRCT tool, the password field will be encrypted. We cannot encrypt the password field if we do not use the ACRCT tool.
Subtopics
- Mail provider settings for application clients
Use this page to implement the JavaMail API and create mail sessions.- Mail session settings for application clients
Use this page to configure mail session properties.- Mail provider settings for application clients
Use this page to implement the JavaMail API and create mail sessions.- Mail session settings for application clients
Use this page to configure mail session properties.- Example: Configuring mail provider and mail session settings for application clients
We can configure mail provider and mail session settings. This topic provides the required fields, special cases, and an example.
Related
Use application clients
Start the Application Client Resource Configuration Tool and opening an EAR file
Reference:
Protocol providers settings