You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by he...@apache.org on 2005/06/30 15:29:15 UTC

svn commit: r202556 - /webservices/axis/trunk/java/xdocs/mail-transport.html

Author: hemapani
Date: Thu Jun 30 06:29:15 2005
New Revision: 202556

URL: http://svn.apache.org/viewcvs?rev=202556&view=rev
Log:
updates to the mail doc

Modified:
    webservices/axis/trunk/java/xdocs/mail-transport.html

Modified: webservices/axis/trunk/java/xdocs/mail-transport.html
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/mail-transport.html?rev=202556&r1=202555&r2=202556&view=diff
==============================================================================
--- webservices/axis/trunk/java/xdocs/mail-transport.html (original)
+++ webservices/axis/trunk/java/xdocs/mail-transport.html Thu Jun 30 06:29:15 2005
@@ -5,50 +5,47 @@
 </head>
 
 <body><h1>Mail transport</h1>
-<p>Mail transport has two parts, transport Sender and transport Listener. </p>
-
- <a>First you need following additional jar dependencies in the classpath, they can be found by downloading the <a href="http://java.sun.com/products/javamail/">JavaMail API</a></p>
+<p>The inner workings of the mail transport has two parts the transport Sender and the transport Listener. Here the transport Listener is a basic email client which will be on a loop checking for new messages for a particular email address. When an email comes in it will be tunnelled into the Axis engine.</p>
+<p>When you think in terms of usage the mail transport in Axis2 can be used in two ways. It can be used against a generic mail server or it can be used like a mailet. The simple mailet provided will direct any message that is comming to a particular address into the Axis engine. The engine will process the message and will use the Transport sender to send the reply.</p>
+<p></p>
+ <a>First you need following additional jar dependencies in the classpath, they can be found by downloading the <a href="http://java.sun.com/products/javamail/">JavaMail API</a> ans <a href="http://java.sun.com/products/javabeans/jaf/">JavaBeans Activation Framework</a>.</p>
   <ol>
-  <LI>pop3.jar</LI>
-  <LI>smtp.jar</LI>
-  <LI>mailapi.jar</LI>
+  <LI>mail.jar&nbsp;(This contains com.sun.mail.* and javax.mail.*)</LI>
   <LI>activation.jar</LI>
   </ol>
-  
-  
+
 <h2>Transport Sender</h2>
-<p>You need a mail account in a SMTP server, and Mail transport sender can be activated by adding following entry to the server.xml file or client.xml file or in both.
-  </p>
-  
+<p>You need a mail account in a SMTP server, and Mail transport sender can be activated by adding following entry to the axis2.xml file.</p>
   <code>
-  <pre>   &lt;transportSender name="mail" class="org.apache.axis.transport.mail.MailTransportSender"&gt;
+  <pre>
+   &lt;transportSender name="mail" class="org.apache.axis.transport.mail.MailTransportSender"&gt;
         &lt;parameter name="transport.mail.smtp.host" locked="xsd:false"&gt;smtp server host&lt;/parameter&gt;
         &lt;parameter name="transport.mail.smtp.user" locked="xsd:false"&gt;user name&lt;/parameter&gt;
         &lt;parameter name="transport.mail.smtp.password" locked="xsd:false"&gt;password&lt;/parameter&gt;
-        &lt;parameter name="transport.mail.smtp.port" locked="xsd:false"&gt;25&lt;/parameter&gt;
+        &lt;parameter name="transport.mail.smtp.port" locked="xsd:false"&gt;Port on the server for pop&lt;/parameter&gt;
    &lt;/transportSender&gt;
   </pre>
   </code>
-  
+
   <h2>Transport Receiver</h2>
- 
-  
-  <p>You need a mail address that has pop access, the mail Listener can be activated by adding following entry to the server.xml file or client.xml file or in both.</p>
-  
-  <code><pre>  &lt;transportReceiver name="mail" class="org.apache.axis.transport.mail.SimpleMailListener">
+
+  <p>You need a mail address that has pop access, the mail Listener can be activated by adding following entry to the axis2.xml file.</p>
+
+  <code><pre>
+   &lt;transportReceiver name="mail" class="org.apache.axis.transport.mail.SimpleMailListener">
         &lt;parameter name="transport.mail.pop3.host" locked="xsd:false"&gt;pop server host&lt;/parameter&gt;
         &lt;parameter name="transport.mail.pop3.user" locked="xsd:false"&gt;user name&lt;/parameter&gt;
         &lt;parameter name="transport.mail.pop3.password" locked="xsd:false"&gt;password&lt;/parameter&gt;
-        &lt;parameter name="transport.mail.pop3.port" locked="xsd:false"&gt;110&lt;/parameter&gt;
+        &lt;parameter name="transport.mail.pop3.port" locked="xsd:false"&gt;Port on the server for smtp&lt;/parameter&gt;
         &lt;parameter name="transport.mail.replyToAddress" locked="xsd:false"&gt;email address&lt;/parameter&gt;
   &lt;/transportReceiver&gt;
   </pre></code>
-  
+
   <p>At the Client side if the Mail Listener is needed it is automatically started by Axis2.</p>
-  
+
   <h2>Using Mail transport in the Server Side</h2>
   <p> If the Mail Listener is need to be started as the server it can be done with following command with the all the axis2 jars and the mail dependency jars in the classpath.</p>
-  <code>Java org.apache.axis.transport.mail.SimpleMailListener repository-directory</code>
+  <code>java org.apache.axis.transport.mail.SimpleMailListener repository-directory</code>
 
   <h2>Using Mail transport in the Client Side</h2>
   <p>Following code segment shows how to send a oneway SOAP message using the mail transport, this need the Transport Sender configured.</p>
@@ -65,11 +62,13 @@
 </pre>
   
   <h2>Configure James as SMTP and POP server</h2>
-  <p>Download the <a href="http://james.apache.org/">Apache James</a> and start the James, connect to the James via telnet for administrator James with following code
+  <p>Download the <a href="http://james.apache.org/">Apache James</a> and start James, connect to the James via telnet for administrator James with following code
 </p>
-  <code>
-  <pre>  $telnet 127.0.0.1 4555
-  Trying 127.0.0.1...
+
+<pre>
+<code>
+$telnet 127.0.0.1 4555
+Trying 127.0.0.1...
 Connected to localhost.localdomain (127.0.0.1).
 Escape character is '^]'.
 JAMES Remote Administration Tool 2.2.0
@@ -79,27 +78,30 @@
 Password:
 root
 Welcome root. HELP for a list of commands
-  </pre>
-  </code>
+</code>
+</pre>
 
-  <p>add users to the James</p>
-  <code>
-  <pre>adduser axis2-server axis2
+<p>Add users to James</p>
+<pre>
+<code>
+adduser axis2-server axis2
 User axis2-server added
 adduser axis2-client axis2
 User axis2-client added
 Connection closed by foreign host.
-  </pre>
-  </code>  
-  
-  <p>Now the James is up and running with the accounts</p>
-  
-  <hr>  
-  
+</code>
+</pre>
+
+  <p>Now James is up and running with the accounts</p>
+
+  <h2>Using the included mail server</h2>
+
+  <p>The inbuilt mail server has to be started from code by providing a ConfigurationContext for the time being, because the standalone and the mailet functionality is tightly bound with the mailet functionality.</p>
+  <p>This server itself does not need any configuration or tinkering to work. A configurationContext and the ports to operate on are the only details needed. The server will store the mails in memory against the recipient till the recipient pops it from the server. To facilitate the use in *nix environments as a non root user the pop and smtp ports used by default config/test cases are (1024 + 25) and (1024 + 110).</p>
+
+  <hr/>
+
   <p>&nbsp;</p>
-  
-  
- 
-   
+
 </body>
 </html>