blob: ebf137144a135b56763d659978966fd0cc13835a [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
/****************************************************************
* Licensed to the Apache Software Foundation (ASF) under one *
* or more contributor license agreements. See the NOTICE file *
* distributed with this work for additional information *
* regarding copyright ownership. The ASF licenses this file *
* to you under the Apache License, Version 2.0 (the *
* "License"); you may not use this file except in compliance *
* with the License. You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, *
* software distributed under the License is distributed on an *
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
* KIND, either express or implied. See the License for the *
* specific language governing permissions and limitations *
* under the License. *
****************************************************************/
-->
<document>
<properties>
<title>Samples</title>
</properties>
<body>
<section name="Samples">
<p>
The Mime4j distribution includes samples
which demonstrate how the library could be used. This section
gives you a short review of those samples. For more information
you should download the distribution and study the sample sources.
The samples are in the <code>examples/</code> sub-directory.
</p>
<table>
<tr>
<th>Sample</th>
<th>Description</th>
</tr>
<tr>
<td>
<code>org.apache.james.mime4j.samples.tree.MessageTree</code>
</td>
<td>Displays a tree of the contents of a
Mime4j <code>Message</code> object in a Swing GUI.
To try it out run
<blockquote>
<code>java org.apache.james.mime4j.samples.tree.MessageTree path/to/message.msg</code>
</blockquote>
The output is very useful if
you want the study the structure of MIME messages.
</td>
</tr>
<tr>
<td>
<code>org.apache.james.mime4j.samples.transform.TransformMessage</code>
</td>
<td>Illustrate how to transform a message into another message without
modifying the original.
</td>
</tr>
<tr>
<td>
<code>org.apache.james.mime4j.samples.dom.TextPlainMessage</code>
</td>
<td>Illustrate the use of Mime4j DOM API. This example generates a message
very similar to the one from
<a href="http://www.rfc-editor.org/rfc/rfc5322.txt">RFC 5322</a>
Appendix A.1.1.
</td>
</tr>
<tr>
<td>
<code>org.apache.james.mime4j.samples.dom.MultipartMessage</code>
</td>
<td>Illustrate the use of Mime4j DOM API. This example creates a
multipart/mixed message that consists of a text/plain and an image/png
part. The image is created on the fly; a similar technique can be used
to create PDF or XML attachments, for example.
</td>
</tr>
<!-- <tr>
<td>
<code>org.apache.james.mime4j.samples.sax.Mime2Sax</code>
</td>
<td></td>
</tr>
<tr>
<td>
<code>org.apache.james.mime4j.samples.pgp.PGPSignatureVerifier</code>
</td>
<td></td>
</tr> -->
</table>
</section>
</body>
</document>