<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
<!--ArborText, Inc., 1988-1999, v.4002-->
<!ENTITY metainfo SYSTEM "metainfo.sgm">
<!ENTITY options-common SYSTEM "options-common.sgm">
<!ENTITY synopsis-common SYSTEM "synopsis-common.sgm">
<!ENTITY % commonents SYSTEM "smancommon.ent">
%commonents;
<!ENTITY % booktitles SYSTEM "booktitles.ent">
%booktitles;
<!ENTITY Dash "&ndash;">
]>
<?Pub UDT _bookmark _target>
<?Pub EntList brvbar bull cross dash diam diams frac12 frac13 frac14 hellip
 laquo lArr loz mdash nabla ndash para pound rArr raquo sect yen bsol>
<?Pub Inc>
<refentry id="create-javamail-resource-1">
<refmeta><refentrytitle>create-javamail-resource</refentrytitle><manvolnum>
1</manvolnum>&metainfo;
</refmeta>
<refnamediv><indexterm><primary sortas="create-javamail-resource">create-javamail-resource &mdash;
creates a JavaMail session resource</primary></indexterm><indexterm><primary
sortas="registers the Javamail resource">creates a JavaMail session resource &mdash;
create-javamail-resource</primary></indexterm><refname>create-javamail-resource
</refname><refpurpose>creates a JavaMail session resource</refpurpose></refnamediv>
<refsynopsisdiv><title>&synp-tt;</title>
<cmdsynopsis><command>create-javamail-resource</command>&synopsis-common;
<arg>&Dash;&Dash;target <replaceable>target</replaceable></arg><arg choice="plain">&Dash;&Dash;mailhost <replaceable>
hostname</replaceable></arg><arg choice="plain">&Dash;&Dash;mailuser <replaceable>
username</replaceable></arg><arg choice="plain">&Dash;&Dash;fromaddress <replaceable>
address</replaceable></arg><arg>&Dash;&Dash;storeprotocol <replaceable>imap
</replaceable></arg><arg>&Dash;&Dash;storeprotocolclass <replaceable>com.sun.mail.imapIMAPStore
</replaceable></arg><arg>&Dash;&Dash;transprotocol <replaceable>smtp</replaceable></arg>
<arg>&Dash;&Dash;transprotocolclass <replaceable>com.sun.mail.smtp.SMTPTransport
</replaceable></arg><arg>&Dash;&Dash;debug=<replaceable>false</replaceable></arg>
<arg>&Dash;&Dash;enabled=<replaceable>true</replaceable></arg><arg>&Dash;&Dash;description <replaceable>
text</replaceable></arg><arg><option role="nodash">&Dash;&Dash;property (<replaceable>
name</replaceable>=<replaceable>value</replaceable>)[:<replaceable>name</replaceable>=<replaceable>
value</replaceable>]*</option></arg><arg choice="plain"><replaceable>jndi_name
</replaceable></arg>
</cmdsynopsis></refsynopsisdiv>
<refsect1><title>&desc-tt;</title>
<para>The <command>create-javamail-resource</command> command creates a JavaMail
session resource. This command is supported in remote mode only.</para>
</refsect1>
<refsect1><title>&opts-tt;</title>
<variablelist termlength="medium">&options-common;
<varlistentry><term><option role="nodash">&Dash;&Dash;target</option></term>
<listitem><para>This option specifies the target for which you are creating
the JavaMail session resource. Valid values are:<itemizedlist>
<listitem><para><literal>server</literal>, which creates the resource for
the default server instance. This is the default value.</para>
</listitem>
<listitem><para><literal>domain</literal>, which creates the resource for
the domain</para>
</listitem>
<listitem><para><replaceable>cluster_name</replaceable>, which creates the
resource for every server instance in the cluster</para>
</listitem>
<listitem><para><replaceable>instance_name</replaceable>, which creates the
resource for a particular server instance</para>
</listitem>
</itemizedlist>&se-ee-only;</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;mailhost</option></term>
<listitem><para>The DNS name of the default mail server. The connect methods
of the Store and Transport objects use this value if a protocol-specific host
property is not supplied. The name must be resolvable to an actual host name.
</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;mailuser</option></term>
<listitem><para>The name of the mail account user provided when connecting
to a mail server. The connect methods of the Store and Transport objects use
this value if a protocol-specific username property is not supplied.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;fromaddress</option></term>
<listitem><para>The email address of the default user, in the form <replaceable>
username</replaceable><literal>@</literal><replaceable>host</replaceable><literal>
.</literal><replaceable>domain</replaceable>.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;storeprotocol</option></term>
<listitem><para>The mail server store protocol. The default is <literal>imap
</literal>.  Change this value only if you have reconfigured the Application
Server's mail provider to use a nondefault store protocol.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;storeprotocolclass</option></term>
<listitem><para>The mail server store protocol class name. The default is <literal>
com.sun.mail.imap.IMAPStore</literal>.  Change this value only if you have
reconfigured the Application Server's mail provider to use a nondefault store
protocol.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;transprotocol</option></term>
<listitem><para>The mail server transport protocol. The default is <literal>
smtp</literal>. Change this value only if you have reconfigured the Application
Server's mail provider to use a nondefault transport protocol.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;transprotocolclass</option></term>
<listitem><para>The mail server transport protocol class name. The default
is <literal>com.sun.mail.smtp.SMTPTransport</literal>. Change this value only
if you have reconfigured the Application Server's mail provider to use a nondefault
transport protocol.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;debug</option></term>
<listitem><para>If set to true, the server starts up in debug mode for this
resource. If the JavaMail log level is set to FINE or FINER, the debugging
output will be generated and will be included in the server log file. The
default value is false.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;enabled</option></term>
<listitem><para>If set to true, the resource is enabled at runtime. The default
value is true.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;description</option></term>
<listitem><para> Text providing some details of the JavaMail resource.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;property</option></term>
<listitem><para>Optional attribute name/value pairs for configuring the JavaMail
resource. The JavaMail API documentation lists the properties you might want
to set.</para>
</listitem></varlistentry>
</variablelist></refsect1>
<refsect1><title>&oper-tt;</title>
<variablelist termlength="medium">
<varlistentry><term><replaceable>jndi_name</replaceable></term><listitem>
<para>The JNDI name of the JavaMail resource to be created. It is a recommended
practice to use the naming subcontext prefix <literal>mail/</literal> for
JavaMail resources.</para>
</listitem></varlistentry>
</variablelist></refsect1>
<refsect1><title>&exam-tt;</title>
<example>
<title>Using the create-javamail-resource command</title>
<para>The following command creates a JavaMail resource named <filename>mail/MyMailSession
</filename>. The escape character (\\) is used in the <option role="nodash">&Dash;&Dash;fromaddress
</option> option to distinguish the dot (<literal>.</literal>) and at sign
(<literal>@</literal>). The JNDI name for a JavaMail session resource customarily
includes the <literal>mail/</literal> naming subcontext.</para>
<screen>asadmin> <userinput>create-javamail-resource --user admin 
--passwordfile passwords.txt --host fuyako --port 7070 
--mailhost localhost --mailuser sample 
--fromaddress sample\\@sun\<?Pub Caret>\.com mail/MyMailSession</userinput>
Command create-javamail-resource executed successfully.</screen>
</example>
</refsect1>
<refsect1><title>&exit-tt;</title>
<variablelist termlength="medium">
<varlistentry><term>0</term><listitem><para>command executed successfully
</para>
</listitem></varlistentry>
<varlistentry><term>1</term><listitem><para>error in executing the command
</para>
</listitem></varlistentry>
</variablelist></refsect1>
<refsect1><title>&also-tt;</title>
<para><link linkend="delete-javamail-resource-1"><citerefentry><refentrytitle>
delete-javamail-resource</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>, <link
linkend="list-javamail-resources-1"><citerefentry><refentrytitle>list-javamail-resources
</refentrytitle><manvolnum>1</manvolnum></citerefentry></link></para>
</refsect1>
</refentry>
<?Pub *0000008983>
