<!--Arbortext, Inc., 1988-2008, v.4002-->
<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD SolBook 3.5//EN" [
<!ENTITY options-common SYSTEM "options-common.sgm">
<!ENTITY synopsis-common SYSTEM "synopsis-common.sgm">
<!ENTITY % commonents SYSTEM "common.ent">
%commonents;
]>
<?Pub UDT _bookmark _target>
<?Pub EntList bull rArr sect>
<?Pub Inc>
<refentry id="create-javamail-resource-1"><?Pub Tag atict:info tracking="off"
ref="2"><?Pub Tag atict:user user="hl34125" fullname=""><?Pub Tag atict:user
user="pmdavies" fullname=""><?Pub Tag atict:user user="ah95648" fullname="">
<!-- @(#)create-javamail-resource.1 1.10 07/07/25 SMI; -->
<refmeta><refentrytitle>create-javamail-resource</refentrytitle><manvolnum>1</manvolnum>
<refmiscinfo class="date">30 Jan 2007</refmiscinfo>
<refmiscinfo class="sectdesc">&man1;</refmiscinfo>
<refmiscinfo class="software">&software;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
<refmiscinfo class="copyright">Copyright (c) 2007, Sun Microsystems, Inc.
All Rights Reserved</refmiscinfo>
</refmeta>
<refnamediv><indexterm><primary>create-javamail-resource</primary></indexterm>
<indexterm><primary>creates a JavaMail session resource</primary></indexterm>
<refname>create-javamail-resource</refname><refpurpose>creates a JavaMail
session resource</refpurpose></refnamediv>
<refsynopsisdiv><title></title>
<synopsis><command>create-javamail-resource</command> &synopsis-common; [<option
role="double-dash">target</option> <replaceable>target</replaceable>]
 <option role="double-dash">mailhost</option> <replaceable>hostname</replaceable> <option
role="double-dash">mailuser</option> <replaceable>username</replaceable>
 <option role="double-dash">fromaddress</option> <replaceable>address</replaceable> [<option
role="double-dash">storeprotocol</option> <replaceable>imap</replaceable>]
 [<option role="double-dash">storeprotocolclass</option> <replaceable>com.sun.mail.imapIMAPStore
</replaceable>]
 [<option role="double-dash">transprotocol</option> <replaceable>smtp</replaceable>] [<option
role="double-dash">transprotocolclass</option> <replaceable>com.sun.mail.smtp.SMTPTransport
</replaceable>]
 [<option role="double-dash">debug</option>=<replaceable>false</replaceable>] [<option
role="double-dash">enabled</option>=<replaceable>true</replaceable>]
 [<option role="double-dash">description</option> <replaceable>text</replaceable>] [<option
role="double-dash">property</option> (<replaceable>name</replaceable>=<replaceable>
value</replaceable>)[:<replaceable>name</replaceable>=<replaceable>value</replaceable>]*]
 <replaceable>jndi_name</replaceable></synopsis>
</refsynopsisdiv>
<refsect1 role="description"><title></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 role="options"><title></title>
<variablelist termlength="medium">&options-common;
<varlistentry><term><option role="double-dash">target</option></term>
<listitem><para>This option specifies the target for which you are creating
the JavaMail session resource. Valid values are:</para>
<itemizedlist>
<listitem><para><literal>server</literal>&hyphen; Specifies the default server
instance as the target for creating  the JavaMail session resource.</para>
</listitem>
<listitem><para><literal>domain</literal>&hyphen; Specifies a particular domain
as the target for creating  the JavaMail session resource.</para></listitem>
<listitem><para><replaceable>cluster_name</replaceable>&hyphen; Specifies
a particular cluster as the target for creating  the JavaMail session resource.</para>
</listitem>
<listitem><para><replaceable>instance_name</replaceable>&hyphen; Specifies
a particular server instance as the target for creating  the JavaMail session
resource.</para></listitem>
</itemizedlist>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-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="double-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="double-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="double-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<?Pub Caret> mail provider
to use a nondefault store protocol.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-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 mail provider to use a nondefault store protocol.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-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 mail provider to use a
nondefault transport protocol.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-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 mail provider to use a nondefault transport protocol.
</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-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="double-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="double-dash">description</option></term>
<listitem><para> Text providing some details of the JavaMail resource.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-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 role="operands"><title></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 role="examples"><title></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="double-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\\.com mail/MyMailSession</userinput>
Command create-javamail-resource executed successfully.</screen>
</example>
</refsect1>
<refsect1 role="exit-status"><title></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 role="see-also"><title></title>
<para><olink targetdoc="asrefman" targetptr="delete-javamail-resource-1">delete-javamail-resource(1)
</olink>, <olink targetdoc="asrefman" targetptr="list-javamail-resources-1">list-javamail-resources(1)
</olink></para>
</refsect1>
</refentry>
<?Pub *0000009086 0>
