<?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 <a href="https://github.com/apache/james-mime4j/tree/master/examples">examples</a>
            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>
            <p>Each one of these examples can be run easily from an IDE.</p>
            <table>
                    <tr>
                        <th>Sample</th>
                        <th>Description</th>
                    </tr>
                    <tr>
                        <td>
                            <code>org.apache.james.mime4j.samples.tree.MessageTree</code>
                            <a href="https://github.com/apache/james-mime4j/tree/master/examples/src/main/java/org/apache/james/mime4j/samples/tree.MessageTree.java">org.apache.james.mime4j.samples.tree.MessageTree</a>
                        </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>
                            <a href="https://github.com/apache/james-mime4j/tree/master/examples/src/main/java/org/apache/james/mime4j/samples/transform/TransformMessage.java">org.apache.james.mime4j.samples.transform.TransformMessage</a>
                        </td>
                        <td>Illustrate how to transform a message into another message without 
                            modifying the original.
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <a href="https://github.com/apache/james-mime4j/tree/master/examples/src/main/java/org/apache/james/mime4j/samples/dom/TextPlainMessage.java">org.apache.james.mime4j.samples.dom.TextPlainMessage</a>
                        </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>
                            <a href="https://github.com/apache/james-mime4j/tree/master/examples/src/main/java/org/apache/james/mime4j/samples/dom/MultipartMessage.java">org.apache.james.mime4j.samples.dom.MultipartMessage</a>
                        </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>
                            <a href="https://github.com/apache/james-mime4j/tree/master/examples/src/main/java/org/apache/james/mime4j/samples/dom/ParsingMessage.java">org.apache.james.mime4j.samples.dom.ParsingMessage</a>
                        </td>
                        <td>Illustrate the use of Mime4j DOM API in order to parse messages.</td>
                    </tr>
                </table>
        </section>
    </body>
</document>
