Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Mon Apr 20 17:19:50 
2015
@@ -4040,11 +4040,11 @@ While not actual tutorials you might fin
                     </div>
     </div>
 <h2 id="BookInOnePage-Preface">Preface</h2><p>This tutorial aims to guide the 
reader through the stages of creating a project which uses Camel to facilitate 
the routing of messages from a JMS queue to a <a shape="rect" 
class="external-link" href="http://www.springramework.org"; 
rel="nofollow">Spring</a> service. The route works in a synchronous fashion 
returning a response to the client.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1429348732212 {padding: 0px;}
-div.rbtoc1429348732212 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1429348732212 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1429550292827 {padding: 0px;}
+div.rbtoc1429550292827 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1429550292827 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1429348732212">
+/*]]>*/</style></p><div class="toc-macro rbtoc1429550292827">
 <ul class="toc-indentation"><li><a shape="rect" 
href="#Tutorial-JmsRemoting-TutorialonSpringRemotingwithJMS">Tutorial on Spring 
Remoting with JMS</a></li><li><a shape="rect" 
href="#Tutorial-JmsRemoting-Preface">Preface</a></li><li><a shape="rect" 
href="#Tutorial-JmsRemoting-Prerequisites">Prerequisites</a></li><li><a 
shape="rect" 
href="#Tutorial-JmsRemoting-Distribution">Distribution</a></li><li><a 
shape="rect" href="#Tutorial-JmsRemoting-About">About</a></li><li><a 
shape="rect" href="#Tutorial-JmsRemoting-CreatetheCamelProject">Create the 
Camel Project</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#Tutorial-JmsRemoting-UpdatethePOMwithDependencies">Update the POM with 
Dependencies</a></li></ul>
 </li><li><a shape="rect" href="#Tutorial-JmsRemoting-WritingtheServer">Writing 
the Server</a>
@@ -6230,11 +6230,11 @@ So we completed the last piece in the pi
 
 
 <style type="text/css">/*<![CDATA[*/
-div.rbtoc1429348732530 {padding: 0px;}
-div.rbtoc1429348732530 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1429348732530 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1429550293172 {padding: 0px;}
+div.rbtoc1429550293172 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1429550293172 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style><div class="toc-macro rbtoc1429348732530">
+/*]]>*/</style><div class="toc-macro rbtoc1429550293172">
 <ul class="toc-indentation"><li><a shape="rect" 
href="#Tutorial-AXIS-Camel-TutorialusingAxis1.4withApacheCamel">Tutorial using 
Axis 1.4 with Apache Camel</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#Tutorial-AXIS-Camel-Prerequisites">Prerequisites</a></li><li><a 
shape="rect" 
href="#Tutorial-AXIS-Camel-Distribution">Distribution</a></li><li><a 
shape="rect" 
href="#Tutorial-AXIS-Camel-Introduction">Introduction</a></li><li><a 
shape="rect" href="#Tutorial-AXIS-Camel-SettinguptheprojecttorunAxis">Setting 
up the project to run Axis</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#Tutorial-AXIS-Camel-Maven2">Maven 2</a></li><li><a shape="rect" 
href="#Tutorial-AXIS-Camel-wsdl">wsdl</a></li><li><a shape="rect" 
href="#Tutorial-AXIS-Camel-ConfiguringAxis">Configuring Axis</a></li><li><a 
shape="rect" href="#Tutorial-AXIS-Camel-RunningtheExample">Running the 
Example</a></li></ul>
@@ -18851,11 +18851,11 @@ template.send(&quot;direct:alias-verify&
                     </div>
     </div>
 <p>The <strong>cxf:</strong> component provides integration with <a 
shape="rect" href="http://cxf.apache.org";>Apache CXF</a> for connecting to 
JAX-WS services hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1429348756406 {padding: 0px;}
-div.rbtoc1429348756406 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1429348756406 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1429550313291 {padding: 0px;}
+div.rbtoc1429550313291 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1429550313291 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1429348756406">
+/*]]>*/</style></p><div class="toc-macro rbtoc1429550313291">
 <ul class="toc-indentation"><li><a shape="rect" href="#CXF-CXFComponent">CXF 
Component</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#CXF-URIformat">URI 
format</a></li><li><a shape="rect" href="#CXF-Options">Options</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#CXF-Thedescriptionsofthedataformats">The descriptions of the 
dataformats</a>
@@ -24804,7 +24804,7 @@ imaps://[username@]host[:port][?options]
 </div></div><p>For example:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[smtp://mycompany.mailserver:30?password=tiger&amp;username=scott
 ]]></script>
-</div></div><h4 id="BookInOnePage-DefaultPortsDefaultports"><span 
class="confluence-anchor-link" id="BookInOnePage-DefaultPorts"></span>Default 
ports</h4><p>Default port numbers are supported. If the port number is omitted, 
Camel determines the port number to use based on the protocol.</p><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Protocol</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default Port Number</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>SMTP</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>25</code></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>SMTPS</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>465</code></p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>POP3</code></p></td><td colspan="1" 
rowspan="1" class="confluen
 ceTd"><p><code>110</code></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>POP3S</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>995</code></p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>IMAP</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>143</code></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>IMAPS</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>993</code></p></td></tr></tbody></table></div></div><h3
 id="BookInOnePage-Options.53">Options</h3><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Property</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>host</code></p
 ></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><p>The host name or IP address 
 >to connect to.</p></td></tr><tr><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>port</code></p></td><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p>See <a shape="rect" 
 >href="#BookInOnePage-DefaultPorts">#DefaultPorts</a></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p>The TCP port number to connect 
 >on.</p></td></tr><tr><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>username</code></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p>The user name on the email 
 >server.</p></td></tr><tr><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>password</code></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p>The password on the email server
 .</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>ignoreUriScheme</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>If <code>false</code>, Camel uses the 
scheme to determine the transport protocol (POP, IMAP, SMTP 
etc.)</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>contentType</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>text/plain</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The mail message content type. 
Use <code>text/html</code> for HTML mails.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>folderName</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>INBOX</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The folder to 
poll.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>destination</co
 de></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>username@host</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>@deprecated</strong> Use the 
<code>to</code> option instead. The <code>TO</code> recipients (receivers of 
the email).</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>to</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>username@host</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The TO recipients (the receivers of the 
mail). Separate multiple email addresses with a comma.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>replyTo</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>alias@host</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>As of <strong>Camel 2.8.4, 
2.9.1+</strong>, the Reply-To recipients (the receivers of the response mail). 
Separate multiple email addresses with a comma.</p></
 td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CC</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The CC recipients (the receivers of the mail). Separate 
multiple email addresses with a comma.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>BCC</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The BCC recipients (the receivers of the 
mail). Separate multiple email addresses with a comma.</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>from</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>camel@localhost</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The FROM email 
address.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>subject</code></p></td><td co
 lspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>As of <strong>Camel 2.3</strong>, the 
Subject of the message being sent. Note: Setting the subject in the header 
takes precedence over this option.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>peek</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.11.3/2.12.2:</strong> Consumer only. 
Will mark the <code>javax.mail.Message</code> as peeked before processing the 
mail message. This applies to <code>IMAPMessage</code> messages types only. By 
using peek the mail will not be eager marked as <code>SEEN</code> on the mail 
server, which allows us to rollback the mail message if there is an error 
processing in Camel.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>delete</code></p></td><td colspan="1" rowspan="1" 
cla
 ss="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Deletes the messages after they have been processed. 
This is done by setting the <code>DELETED</code> flag on the mail message. If 
<code>false</code>, the <code>SEEN</code> flag is set instead. As of 
<strong>Camel 2.10</strong> you can override this configuration option by 
setting a header with the key <code>delete</code> to determine if the mail 
should be deleted or not.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>unseen</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>It is possible to configure a consumer endpoint so that 
it processes only unseen messages (that is, new messages) or all messages. Note 
that Camel always skips deleted messages. The default option of 
<code>true</code> will filter to only unseen messages. POP3 does not support 
the <code>SEEN</co
 de> flag, so this option is not supported in POP3; use IMAP instead. 
<strong>Important:</strong> This option is <strong>not</strong> in use if you 
also use <code>searchTerm</code> options. Instead if you want to disable unseen 
when using <code>searchTerm</code>'s then add 
<code>searchTerm.unseen=false</code> as a term.</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>copyTo</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> 
Consumer only. After processing a mail message, it can be copied to a mail 
folder with the given name. You can override this configuration value, with a 
header with the key <code>copyTo</code>, allowing you to copy messages to 
folder names configured at runtime.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>fetchSize</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code
 >-1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets 
 >the maximum number of messages to consume during a poll. This can be used to 
 >avoid overloading a mail server, if a mailbox folder contains a lot of 
 >messages. Default value of <code>-1</code> means no fetch size and all 
 >messages will be consumed. Setting the value to 0 is a special corner case, 
 >where Camel will not consume any messages at all.</p></td></tr><tr><td 
 >colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>alternativeBodyHeader</code></p></td><td 
 >colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>CamelMailAlternativeBody</code></p></td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the key to an IN 
 >message header that contains an alternative email body. For example, if you 
 >send emails in <code>text/html</code> format and want to provide an 
 >alternative mail body for non-HTML email clients, set the alternative mail 
 >body with this key as a header.</p></td></tr><tr><td colspan="1" row
 span="1" class="confluenceTd"><p><code>debugMode</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Enable debug mode on the 
underlying mail framework. The SUN Mail framework logs the debug messages to 
<code>System.out</code> by default.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>connectionTimeout</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>30000</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The connection timeout in 
milliseconds. Default is 30 seconds.</p></td></tr><tr><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>consumer.initialDelay</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Milliseconds before the polling 
starts.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>consu
 mer.delay</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>60000</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Camel will poll the mailbox only once a minute by 
default to avoid overloading the mail server.</p></td></tr><tr><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>consumer.useFixedDelay</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Set to <code>true</code> to use 
a fixed delay between polls, otherwise fixed rate is used. See <a shape="rect" 
class="external-link" 
href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html";
 rel="nofollow">ScheduledExecutorService</a> in JDK for 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>disconnect</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1
 " class="confluenceTd"><p><strong>Camel 2.8.3/2.9:</strong> Whether the 
consumer should disconnect after polling. If enabled this forces Camel to 
connect on each poll.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>closeFolder</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.10.4:</strong> Whether the 
consumer should close the folder after polling. Setting this option to 
<code>false</code> and having <code>disconnect=false</code> as well, then the 
consumer keep the folder open between polls.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>mail.XXX</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Set any <a shape="rect" 
class="external-link" 
href="http://java.sun.com/products/javamail/javadocs/index.html"; 
rel="nofollow">addit
 ional java mail properties</a>. For instance if you want to set a special 
property when using POP3 you can now provide the option directly in the URI 
such as: <code>mail.pop3.forgettopheaders=true</code>. You can set multiple 
such options, for example: 
<code>mail.pop3.forgettopheaders=true&amp;mail.mime.encodefilename=true</code>.</p></td></tr><tr><td
 colspan="1" rowspan="1" 
class="confluenceTd"><p><code>mapMailMessage</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Specifies 
whether Camel should map the received mail message to Camel body/headers. If 
set to true, the body of the mail message is mapped to the body of the Camel IN 
message and the mail headers are mapped to IN headers. If this option is set to 
false then the IN message contains a raw <code>javax.mail.Message</code>. You 
can retrieve this raw message by calling <code>exchange.getIn().getBody(java
 x.mail.Message.class)</code>.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>maxMessagesPerPoll</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Specifies the maximum number of messages to 
gather per poll. By default, no maximum is set. Can be used to set a limit of 
e.g. 1000 to avoid downloading thousands of files when the server starts up. 
Set a value of 0 or negative to disable this option.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>javaMailSender</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Specifies a pluggable <span style="color: 
rgb(34,34,34);">org.apache.camel.component.</span><span style="color: 
rgb(34,34,34);">mail.JavaMailSender</span> instance in order to use a custom 
email implementation.</p></td></tr><tr><td colspan="1" 
 rowspan="1" 
class="confluenceTd"><p><code>ignoreUnsupportedCharset</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Option to let Camel ignore 
unsupported charset in the local JVM when sending mails. If the charset is 
unsupported then <code>charset=XXX</code> (where <code>XXX</code> represents 
the unsupported charset) is removed from the <code>content-type</code> and it 
relies on the platform default instead.</p></td></tr><tr><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>sslContextParameters</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> 
Reference to a <code>org.apache.camel.util.jsse.SSLContextParameters</code> in 
the <a shape="rect" class="external-link" 
href="http://camel.apache.org/registry.html";>Registry</a>.&#160; This reference 
overrides any co
 nfigured SSLContextParameters at the component level.&#160; See <a 
shape="rect" class="external-link" 
href="http://camel.apache.org/http4.html#HTTP4-UsingtheJSSEConfigurationUtility";>Using
 the JSSE Configuration Utility</a>.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>searchTerm</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> 
Refers to a <code>javax.mail.search.SearchTerm</code> which allows to filter 
mails based on search criteria such as subject, body, from, sent after a 
certain date etc. See further below for examples.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>searchTerm.xxx</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> To configure 
search terms directly from the endp
 oint uri, which supports a limited number of terms defined by the 
<code>org.apache.camel.component.mail.SimpleSearchTerm</code> class. See 
further below for examples.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p class="p1"><code>sortTerm</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><code>null</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15: </strong>To 
configure the sortTerms that <span>IMAP</span> supports to sort the searched 
mails<strong><strong>. </strong></strong>You may need to define an array of<p 
class="p1"><code>com.sun.mail.imap.sortTerm</code> i<span>n the registry first 
and #name to reference it in this URI option.</span></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p 
class="p1"><code>postProcessAction</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><code>null</code></td><td colspan="1" rowspan="1" 
class="confluenceTd"><strong>Camel 2.15:</strong> Refers to a<c
 ode style="line-height: 
1.4285715;">org.apache.camel.component.mail.</code><span style="line-height: 
1.4285715;"><code>MailBoxPostProcessAction</code> for doing post processing 
tasks on the mailbox once the normal processing ended.</span></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><code>skipFailedMessage</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><strong>Camel 2.15.1:</strong> If the mail 
consumer cannot retrieve a given mail message, then this option allows to skip 
the message and move on to retrieve the next mail message. The default behavior 
would be the consumer throws an exception and no mails from the batch would be 
able to be routed by Camel.</td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><code>handleFailedMessage</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><strong>Cam
 el 2.15.1:</strong> If the mail consumer cannot retrieve a given mail message, 
then this option allows to handle the caused exception by the consumer's error 
handler. By enable the bridge error handler on the consumer, then the Camel 
routing error handler can handle the exception instead. <span>The default 
behavior would be the consumer throws an exception and no mails from the batch 
would be able to be routed by 
Camel.</span></td></tr></tbody></table></div></div><h3 
id="BookInOnePage-SSLsupport">SSL support</h3><p>The underlying mail framework 
is responsible for providing SSL support. &#160;You may either configure 
SSL/TLS support by completely specifying the necessary Java Mail API 
configuration options, or you may provide a configured SSLContextParameters 
through the component or endpoint configuration.</p><h4 
id="BookInOnePage-UsingtheJSSEConfigurationUtility.4">Using the JSSE 
Configuration Utility</h4><p>As of <strong>Camel 2.10</strong>, the mail 
component supports SSL/TLS con
 figuration through the <a shape="rect" 
href="camel-configuration-utilities.html">Camel JSSE Configuration 
Utility</a>.&#160; This utility greatly decreases the amount of component 
specific code you need to write and is configurable at the endpoint and 
component levels.&#160; The following examples demonstrate how to use the 
utility with the mail component.</p><h5 
id="BookInOnePage-Programmaticconfigurationoftheendpoint.1">Programmatic 
configuration of the endpoint</h5><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h4 id="BookInOnePage-DefaultPortsDefaultports"><span 
class="confluence-anchor-link" id="BookInOnePage-DefaultPorts"></span>Default 
ports</h4><p>Default port numbers are supported. If the port number is omitted, 
Camel determines the port number to use based on the protocol.</p><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Protocol</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default Port Number</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>SMTP</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>25</code></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>SMTPS</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>465</code></p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>POP3</code></p></td><td colspan="1" 
rowspan="1" class="confluen
 ceTd"><p><code>110</code></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>POP3S</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>995</code></p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>IMAP</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>143</code></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>IMAPS</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>993</code></p></td></tr></tbody></table></div></div><h3
 id="BookInOnePage-Options.53">Options</h3><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Property</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>host</code></p
 ></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><p>The host name or IP address 
 >to connect to.</p></td></tr><tr><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>port</code></p></td><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p>See <a shape="rect" 
 >href="#BookInOnePage-DefaultPorts">#DefaultPorts</a></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p>The TCP port number to connect 
 >on.</p></td></tr><tr><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>username</code></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p>The user name on the email 
 >server.</p></td></tr><tr><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>password</code></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p>The password on the email server
 .</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>ignoreUriScheme</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>If <code>false</code>, Camel uses the 
scheme to determine the transport protocol (POP, IMAP, SMTP 
etc.)</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>contentType</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>text/plain</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The mail message content type. 
Use <code>text/html</code> for HTML mails.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>folderName</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>INBOX</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The folder to 
poll.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>destination</co
 de></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>username@host</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>@deprecated</strong> Use the 
<code>to</code> option instead. The <code>TO</code> recipients (receivers of 
the email).</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>to</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>username@host</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The TO recipients (the receivers of the 
mail). Separate multiple email addresses with a comma. Email addresses 
containing special characters such as "&amp;" will need to be handled 
differently - see <a shape="rect" 
href="how-do-i-configure-password-options-on-camel-endpoints-without-the-value-being-encoded.html">How
 do I configure password options on Camel endpoints without the value being 
encoded</a>.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>replyTo
 </code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>alias@host</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>As of <strong>Camel 2.8.4, 2.9.1+</strong>, 
the Reply-To recipients (the receivers of the response mail). Separate multiple 
email addresses with a comma.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CC</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The CC recipients (the receivers of the mail). Separate 
multiple email addresses with a comma.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>BCC</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The BCC recipients (the receivers of the 
mail). Separate multiple email addresses with a comma.</p></td></tr><tr><td 
colspan="1" rowspan="1" class="c
 onfluenceTd"><p><code>from</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>camel@localhost</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The FROM email 
address.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>subject</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>As of <strong>Camel 2.3</strong>, the Subject of the 
message being sent. Note: Setting the subject in the header takes precedence 
over this option.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>peek</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.11.3/2.12.2:</strong> Consumer only. 
Will mark the <code>javax.mail.Message</code> as peeked before processing the 
mail message. This applies to <code>IMAPMessage</code> messages types
  only. By using peek the mail will not be eager marked as <code>SEEN</code> on 
the mail server, which allows us to rollback the mail message if there is an 
error processing in Camel.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>delete</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Deletes the messages after they have been processed. 
This is done by setting the <code>DELETED</code> flag on the mail message. If 
<code>false</code>, the <code>SEEN</code> flag is set instead. As of 
<strong>Camel 2.10</strong> you can override this configuration option by 
setting a header with the key <code>delete</code> to determine if the mail 
should be deleted or not.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>unseen</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" 
class="c
 onfluenceTd"><p>It is possible to configure a consumer endpoint so that it 
processes only unseen messages (that is, new messages) or all messages. Note 
that Camel always skips deleted messages. The default option of 
<code>true</code> will filter to only unseen messages. POP3 does not support 
the <code>SEEN</code> flag, so this option is not supported in POP3; use IMAP 
instead. <strong>Important:</strong> This option is <strong>not</strong> in use 
if you also use <code>searchTerm</code> options. Instead if you want to disable 
unseen when using <code>searchTerm</code>'s then add 
<code>searchTerm.unseen=false</code> as a term.</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>copyTo</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> 
Consumer only. After processing a mail message, it can be copied to a mail 
folder with the given name. You ca
 n override this configuration value, with a header with the key 
<code>copyTo</code>, allowing you to copy messages to folder names configured 
at runtime.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>fetchSize</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>-1</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Sets the maximum number of messages to 
consume during a poll. This can be used to avoid overloading a mail server, if 
a mailbox folder contains a lot of messages. Default value of <code>-1</code> 
means no fetch size and all messages will be consumed. Setting the value to 0 
is a special corner case, where Camel will not consume any messages at 
all.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>alternativeBodyHeader</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CamelMailAlternativeBody</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Spe
 cifies the key to an IN message header that contains an alternative email 
body. For example, if you send emails in <code>text/html</code> format and want 
to provide an alternative mail body for non-HTML email clients, set the 
alternative mail body with this key as a header.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>debugMode</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Enable debug mode on the underlying mail 
framework. The SUN Mail framework logs the debug messages to 
<code>System.out</code> by default.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>connectionTimeout</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>30000</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The connection timeout in 
milliseconds. Default is 30 seconds.</p></td></tr><tr><td colspan="1" 
rowspan="1" class=
 "confluenceTd"><p><code>consumer.initialDelay</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Milliseconds before the polling 
starts.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>consumer.delay</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>60000</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Camel will poll the mailbox only once a 
minute by default to avoid overloading the mail server.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>consumer.useFixedDelay</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Set to <code>true</code> to use 
a fixed delay between polls, otherwise fixed rate is used. See <a shape="rect" 
class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/c
 oncurrent/ScheduledExecutorService.html" 
rel="nofollow">ScheduledExecutorService</a> in JDK for 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>disconnect</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.8.3/2.9:</strong> Whether 
the consumer should disconnect after polling. If enabled this forces Camel to 
connect on each poll.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>closeFolder</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.10.4:</strong> Whether the 
consumer should close the folder after polling. Setting this option to 
<code>false</code> and having <code>disconnect=false</code> as well, then the 
consumer keep the folder open between polls.</p></td></tr><tr><td colspan="1" 
rowspan="1" clas
 s="confluenceTd"><p><code>mail.XXX</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Set any <a shape="rect" class="external-link" 
href="http://java.sun.com/products/javamail/javadocs/index.html"; 
rel="nofollow">additional java mail properties</a>. For instance if you want to 
set a special property when using POP3 you can now provide the option directly 
in the URI such as: <code>mail.pop3.forgettopheaders=true</code>. You can set 
multiple such options, for example: 
<code>mail.pop3.forgettopheaders=true&amp;mail.mime.encodefilename=true</code>.</p></td></tr><tr><td
 colspan="1" rowspan="1" 
class="confluenceTd"><p><code>mapMailMessage</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Specifies 
whether Camel should map the received mail message to Camel body/headers. If set
  to true, the body of the mail message is mapped to the body of the Camel IN 
message and the mail headers are mapped to IN headers. If this option is set to 
false then the IN message contains a raw <code>javax.mail.Message</code>. You 
can retrieve this raw message by calling 
<code>exchange.getIn().getBody(javax.mail.Message.class)</code>.</p></td></tr><tr><td
 colspan="1" rowspan="1" 
class="confluenceTd"><p><code>maxMessagesPerPoll</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Specifies the maximum number of messages to 
gather per poll. By default, no maximum is set. Can be used to set a limit of 
e.g. 1000 to avoid downloading thousands of files when the server starts up. 
Set a value of 0 or negative to disable this option.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>javaMailSender</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null<
 /code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies a 
pluggable <span style="color: 
rgb(34,34,34);">org.apache.camel.component.</span><span style="color: 
rgb(34,34,34);">mail.JavaMailSender</span> instance in order to use a custom 
email implementation.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>ignoreUnsupportedCharset</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Option to let Camel ignore 
unsupported charset in the local JVM when sending mails. If the charset is 
unsupported then <code>charset=XXX</code> (where <code>XXX</code> represents 
the unsupported charset) is removed from the <code>content-type</code> and it 
relies on the platform default instead.</p></td></tr><tr><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>sslContextParameters</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</c
 ode></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 
2.10:</strong> Reference to a 
<code>org.apache.camel.util.jsse.SSLContextParameters</code> in the <a 
shape="rect" class="external-link" 
href="http://camel.apache.org/registry.html";>Registry</a>.&#160; This reference 
overrides any configured SSLContextParameters at the component level.&#160; See 
<a shape="rect" class="external-link" 
href="http://camel.apache.org/http4.html#HTTP4-UsingtheJSSEConfigurationUtility";>Using
 the JSSE Configuration Utility</a>.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>searchTerm</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> 
Refers to a <code>javax.mail.search.SearchTerm</code> which allows to filter 
mails based on search criteria such as subject, body, from, sent after a 
certain date etc. See further below for examples.</
 p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>searchTerm.xxx</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> To configure 
search terms directly from the endpoint uri, which supports a limited number of 
terms defined by the 
<code>org.apache.camel.component.mail.SimpleSearchTerm</code> class. See 
further below for examples.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p class="p1"><code>sortTerm</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><code>null</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15: </strong>To 
configure the sortTerms that <span>IMAP</span> supports to sort the searched 
mails<strong><strong>. </strong></strong>You may need to define an array of<p 
class="p1"><code>com.sun.mail.imap.sortTerm</code> i<span>n the registry first 
and #name to reference 
 it in this URI option.</span></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p class="p1"><code>postProcessAction</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><code>null</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15:</strong> 
Refers to a<code style="line-height: 
1.4285715;">org.apache.camel.component.mail.</code><span style="line-height: 
1.4285715;"><code>MailBoxPostProcessAction</code> for doing post processing 
tasks on the mailbox once the normal processing ended.</span></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><code>skipFailedMessage</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><strong>Camel 2.15.1:</strong> If the mail 
consumer cannot retrieve a given mail message, then this option allows to skip 
the message and move on to retrieve the next mail message. The default behavior 
would be the consumer throw
 s an exception and no mails from the batch would be able to be routed by 
Camel.</td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><code>handleFailedMessage</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><strong>Camel 2.15.1:</strong> If the mail 
consumer cannot retrieve a given mail message, then this option allows to 
handle the caused exception by the consumer's error handler. By enable the 
bridge error handler on the consumer, then the Camel routing error handler can 
handle the exception instead. <span>The default behavior would be the consumer 
throws an exception and no mails from the batch would be able to be routed by 
Camel.</span></td></tr></tbody></table></div></div><h3 
id="BookInOnePage-SSLsupport">SSL support</h3><p>The underlying mail framework 
is responsible for providing SSL support. &#160;You may either configure 
SSL/TLS support by completely specifying the necessary Java Ma
 il API configuration options, or you may provide a configured 
SSLContextParameters through the component or endpoint configuration.</p><h4 
id="BookInOnePage-UsingtheJSSEConfigurationUtility.4">Using the JSSE 
Configuration Utility</h4><p>As of <strong>Camel 2.10</strong>, the mail 
component supports SSL/TLS configuration through the <a shape="rect" 
href="camel-configuration-utilities.html">Camel JSSE Configuration 
Utility</a>.&#160; This utility greatly decreases the amount of component 
specific code you need to write and is configurable at the endpoint and 
component levels.&#160; The following examples demonstrate how to use the 
utility with the mail component.</p><h5 
id="BookInOnePage-Programmaticconfigurationoftheendpoint.1">Programmatic 
configuration of the endpoint</h5><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[KeyStoreParameters ksp = new 
KeyStoreParameters();
 ksp.setResource(&quot;/users/home/server/truststore.jks&quot;);
 ksp.setPassword(&quot;keystorePassword&quot;);

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/mail.html
==============================================================================
--- websites/production/camel/content/mail.html (original)
+++ websites/production/camel/content/mail.html Mon Apr 20 17:19:50 2015
@@ -134,7 +134,7 @@ imaps://[username@]host[:port][?options]
 </div></div><p>For example:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[smtp://mycompany.mailserver:30?password=tiger&amp;username=scott
 ]]></script>
-</div></div><h4 id="Mail-DefaultPortsDefaultports"><span 
class="confluence-anchor-link" id="Mail-DefaultPorts"></span>Default 
ports</h4><p>Default port numbers are supported. If the port number is omitted, 
Camel determines the port number to use based on the protocol.</p><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Protocol</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default Port Number</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>SMTP</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>25</code></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>SMTPS</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>465</code></p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>POP3</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>110
 </code></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>POP3S</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>995</code></p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>IMAP</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>143</code></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>IMAPS</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>993</code></p></td></tr></tbody></table></div></div><h3
 id="Mail-Options">Options</h3><div class="confluenceTableSmall"><div 
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" 
rowspan="1" class="confluenceTh"><p>Property</p></th><th colspan="1" 
rowspan="1" class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>host</code></p></td><td colspan="1" 
rowspan=
 "1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The host name or IP address to connect 
to.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>port</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>See <a shape="rect" 
href="#Mail-DefaultPorts">#DefaultPorts</a></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The TCP port number to connect on.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>username</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The user name on the email server.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>password</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The password on the email 
server.</p></td></tr><tr><td colspan="1" rows
 pan="1" class="confluenceTd"><p><code>ignoreUriScheme</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>If <code>false</code>, Camel 
uses the scheme to determine the transport protocol (POP, IMAP, SMTP 
etc.)</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>contentType</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>text/plain</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The mail message content type. 
Use <code>text/html</code> for HTML mails.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>folderName</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>INBOX</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The folder to 
poll.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>destination</code></p></td><td colspan="1" 
rowspan="1"
  class="confluenceTd"><p><code>username@host</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>@deprecated</strong> Use the 
<code>to</code> option instead. The <code>TO</code> recipients (receivers of 
the email).</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>to</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>username@host</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The TO recipients (the receivers of the 
mail). Separate multiple email addresses with a comma.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>replyTo</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>alias@host</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>As of <strong>Camel 2.8.4, 
2.9.1+</strong>, the Reply-To recipients (the receivers of the response mail). 
Separate multiple email addresses with a comma.</p></td></tr><tr><td 
colspan="1" rowspan="1"
  class="confluenceTd"><p><code>CC</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The CC recipients (the receivers of the mail). Separate 
multiple email addresses with a comma.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>BCC</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The BCC recipients (the receivers of the 
mail). Separate multiple email addresses with a comma.</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>from</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>camel@localhost</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The FROM email 
address.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>subject</code></p></td><td colspan="1" 
rowspan="1" class="confluence
 Td"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>As 
of <strong>Camel 2.3</strong>, the Subject of the message being sent. Note: 
Setting the subject in the header takes precedence over this 
option.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>peek</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.11.3/2.12.2:</strong> Consumer only. 
Will mark the <code>javax.mail.Message</code> as peeked before processing the 
mail message. This applies to <code>IMAPMessage</code> messages types only. By 
using peek the mail will not be eager marked as <code>SEEN</code> on the mail 
server, which allows us to rollback the mail message if there is an error 
processing in Camel.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>delete</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>false</code>
 </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Deletes the 
messages after they have been processed. This is done by setting the 
<code>DELETED</code> flag on the mail message. If <code>false</code>, the 
<code>SEEN</code> flag is set instead. As of <strong>Camel 2.10</strong> you 
can override this configuration option by setting a header with the key 
<code>delete</code> to determine if the mail should be deleted or 
not.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>unseen</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>It is possible to configure a consumer endpoint so that 
it processes only unseen messages (that is, new messages) or all messages. Note 
that Camel always skips deleted messages. The default option of 
<code>true</code> will filter to only unseen messages. POP3 does not support 
the <code>SEEN</code> flag, so this option is not support
 ed in POP3; use IMAP instead. <strong>Important:</strong> This option is 
<strong>not</strong> in use if you also use <code>searchTerm</code> options. 
Instead if you want to disable unseen when using <code>searchTerm</code>'s then 
add <code>searchTerm.unseen=false</code> as a term.</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>copyTo</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> 
Consumer only. After processing a mail message, it can be copied to a mail 
folder with the given name. You can override this configuration value, with a 
header with the key <code>copyTo</code>, allowing you to copy messages to 
folder names configured at runtime.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>fetchSize</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>-1</code></p></td><td 
colspan="1" rows
 pan="1" class="confluenceTd"><p>Sets the maximum number of messages to consume 
during a poll. This can be used to avoid overloading a mail server, if a 
mailbox folder contains a lot of messages. Default value of <code>-1</code> 
means no fetch size and all messages will be consumed. Setting the value to 0 
is a special corner case, where Camel will not consume any messages at 
all.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>alternativeBodyHeader</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CamelMailAlternativeBody</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the key to an IN 
message header that contains an alternative email body. For example, if you 
send emails in <code>text/html</code> format and want to provide an alternative 
mail body for non-HTML email clients, set the alternative mail body with this 
key as a header.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>
 debugMode</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Enable debug mode on the underlying mail framework. The 
SUN Mail framework logs the debug messages to <code>System.out</code> by 
default.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>connectionTimeout</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>30000</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The connection timeout in milliseconds. 
Default is 30 seconds.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>consumer.initialDelay</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Milliseconds before the polling 
starts.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>consumer.delay</code></p></td><td colspan="1
 " rowspan="1" class="confluenceTd"><p><code>60000</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Camel will poll the mailbox 
only once a minute by default to avoid overloading the mail 
server.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>consumer.useFixedDelay</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Set to <code>true</code> to use 
a fixed delay between polls, otherwise fixed rate is used. See <a shape="rect" 
class="external-link" 
href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html";
 rel="nofollow">ScheduledExecutorService</a> in JDK for 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>disconnect</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel
  2.8.3/2.9:</strong> Whether the consumer should disconnect after polling. If 
enabled this forces Camel to connect on each poll.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>closeFolder</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.10.4:</strong> Whether the 
consumer should close the folder after polling. Setting this option to 
<code>false</code> and having <code>disconnect=false</code> as well, then the 
consumer keep the folder open between polls.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>mail.XXX</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Set any <a shape="rect" 
class="external-link" 
href="http://java.sun.com/products/javamail/javadocs/index.html"; 
rel="nofollow">additional java mail properties</a>. For ins
 tance if you want to set a special property when using POP3 you can now 
provide the option directly in the URI such as: 
<code>mail.pop3.forgettopheaders=true</code>. You can set multiple such 
options, for example: 
<code>mail.pop3.forgettopheaders=true&amp;mail.mime.encodefilename=true</code>.</p></td></tr><tr><td
 colspan="1" rowspan="1" 
class="confluenceTd"><p><code>mapMailMessage</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Specifies 
whether Camel should map the received mail message to Camel body/headers. If 
set to true, the body of the mail message is mapped to the body of the Camel IN 
message and the mail headers are mapped to IN headers. If this option is set to 
false then the IN message contains a raw <code>javax.mail.Message</code>. You 
can retrieve this raw message by calling 
<code>exchange.getIn().getBody(javax.mail.Message.class)</code>.</p></td><
 /tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>maxMessagesPerPoll</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Specifies the maximum number of messages to 
gather per poll. By default, no maximum is set. Can be used to set a limit of 
e.g. 1000 to avoid downloading thousands of files when the server starts up. 
Set a value of 0 or negative to disable this option.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>javaMailSender</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Specifies a pluggable <span style="color: 
rgb(34,34,34);">org.apache.camel.component.</span><span style="color: 
rgb(34,34,34);">mail.JavaMailSender</span> instance in order to use a custom 
email implementation.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><co
 de>ignoreUnsupportedCharset</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Option to let Camel ignore unsupported charset in the 
local JVM when sending mails. If the charset is unsupported then 
<code>charset=XXX</code> (where <code>XXX</code> represents the unsupported 
charset) is removed from the <code>content-type</code> and it relies on the 
platform default instead.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>sslContextParameters</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> 
Reference to a <code>org.apache.camel.util.jsse.SSLContextParameters</code> in 
the <a shape="rect" class="external-link" 
href="http://camel.apache.org/registry.html";>Registry</a>.&#160; This reference 
overrides any configured SSLContextParameters at the co
 mponent level.&#160; See <a shape="rect" class="external-link" 
href="http://camel.apache.org/http4.html#HTTP4-UsingtheJSSEConfigurationUtility";>Using
 the JSSE Configuration Utility</a>.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>searchTerm</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> 
Refers to a <code>javax.mail.search.SearchTerm</code> which allows to filter 
mails based on search criteria such as subject, body, from, sent after a 
certain date etc. See further below for examples.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>searchTerm.xxx</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> To configure 
search terms directly from the endpoint uri, which supports a limited numb
 er of terms defined by the 
<code>org.apache.camel.component.mail.SimpleSearchTerm</code> class. See 
further below for examples.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p class="p1"><code>sortTerm</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><code>null</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15: </strong>To 
configure the sortTerms that <span>IMAP</span> supports to sort the searched 
mails<strong><strong>. </strong></strong>You may need to define an array of<p 
class="p1"><code>com.sun.mail.imap.sortTerm</code> i<span>n the registry first 
and #name to reference it in this URI option.</span></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p 
class="p1"><code>postProcessAction</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><code>null</code></td><td colspan="1" rowspan="1" 
class="confluenceTd"><strong>Camel 2.15:</strong> Refers to a<code 
style="line-height: 1.4285715;">org
 .apache.camel.component.mail.</code><span style="line-height: 
1.4285715;"><code>MailBoxPostProcessAction</code> for doing post processing 
tasks on the mailbox once the normal processing ended.</span></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><code>skipFailedMessage</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><strong>Camel 2.15.1:</strong> If the mail 
consumer cannot retrieve a given mail message, then this option allows to skip 
the message and move on to retrieve the next mail message. The default behavior 
would be the consumer throws an exception and no mails from the batch would be 
able to be routed by Camel.</td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><code>handleFailedMessage</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><strong>Camel 2.15.1:</strong> If the mail 
consume
 r cannot retrieve a given mail message, then this option allows to handle the 
caused exception by the consumer's error handler. By enable the bridge error 
handler on the consumer, then the Camel routing error handler can handle the 
exception instead. <span>The default behavior would be the consumer throws an 
exception and no mails from the batch would be able to be routed by 
Camel.</span></td></tr></tbody></table></div></div><h3 id="Mail-SSLsupport">SSL 
support</h3><p>The underlying mail framework is responsible for providing SSL 
support. &#160;You may either configure SSL/TLS support by completely 
specifying the necessary Java Mail API configuration options, or you may 
provide a configured SSLContextParameters through the component or endpoint 
configuration.</p><h4 id="Mail-UsingtheJSSEConfigurationUtility">Using the JSSE 
Configuration Utility</h4><p>As of <strong>Camel 2.10</strong>, the mail 
component supports SSL/TLS configuration through the <a shape="rect" 
href="camel-configur
 ation-utilities.html">Camel JSSE Configuration Utility</a>.&#160; This utility 
greatly decreases the amount of component specific code you need to write and 
is configurable at the endpoint and component levels.&#160; The following 
examples demonstrate how to use the utility with the mail component.</p><h5 
id="Mail-Programmaticconfigurationoftheendpoint">Programmatic configuration of 
the endpoint</h5><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+</div></div><h4 id="Mail-DefaultPortsDefaultports"><span 
class="confluence-anchor-link" id="Mail-DefaultPorts"></span>Default 
ports</h4><p>Default port numbers are supported. If the port number is omitted, 
Camel determines the port number to use based on the protocol.</p><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Protocol</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default Port Number</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>SMTP</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>25</code></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>SMTPS</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>465</code></p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>POP3</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>110
 </code></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>POP3S</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>995</code></p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>IMAP</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>143</code></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>IMAPS</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>993</code></p></td></tr></tbody></table></div></div><h3
 id="Mail-Options">Options</h3><div class="confluenceTableSmall"><div 
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" 
rowspan="1" class="confluenceTh"><p>Property</p></th><th colspan="1" 
rowspan="1" class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>host</code></p></td><td colspan="1" 
rowspan=
 "1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The host name or IP address to connect 
to.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>port</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>See <a shape="rect" 
href="#Mail-DefaultPorts">#DefaultPorts</a></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The TCP port number to connect on.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>username</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The user name on the email server.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>password</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The password on the email 
server.</p></td></tr><tr><td colspan="1" rows
 pan="1" class="confluenceTd"><p><code>ignoreUriScheme</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>If <code>false</code>, Camel 
uses the scheme to determine the transport protocol (POP, IMAP, SMTP 
etc.)</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>contentType</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>text/plain</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The mail message content type. 
Use <code>text/html</code> for HTML mails.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>folderName</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>INBOX</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The folder to 
poll.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>destination</code></p></td><td colspan="1" 
rowspan="1"
  class="confluenceTd"><p><code>username@host</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>@deprecated</strong> Use the 
<code>to</code> option instead. The <code>TO</code> recipients (receivers of 
the email).</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>to</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>username@host</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The TO recipients (the receivers of the 
mail). Separate multiple email addresses with a comma. Email addresses 
containing special characters such as "&amp;" will need to be handled 
differently - see <a shape="rect" 
href="how-do-i-configure-password-options-on-camel-endpoints-without-the-value-being-encoded.html">How
 do I configure password options on Camel endpoints without the value being 
encoded</a>.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>replyTo</code></p></td><td colspan="1" rowspan
 ="1" class="confluenceTd"><p><code>alias@host</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>As of <strong>Camel 2.8.4, 2.9.1+</strong>, 
the Reply-To recipients (the receivers of the response mail). Separate multiple 
email addresses with a comma.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CC</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The CC recipients (the receivers of the mail). Separate 
multiple email addresses with a comma.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>BCC</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The BCC recipients (the receivers of the 
mail). Separate multiple email addresses with a comma.</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>from</code></p></
 td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>camel@localhost</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The FROM email 
address.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>subject</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>As of <strong>Camel 2.3</strong>, the Subject of the 
message being sent. Note: Setting the subject in the header takes precedence 
over this option.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>peek</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.11.3/2.12.2:</strong> Consumer only. 
Will mark the <code>javax.mail.Message</code> as peeked before processing the 
mail message. This applies to <code>IMAPMessage</code> messages types only. By 
using peek the mail will not 
 be eager marked as <code>SEEN</code> on the mail server, which allows us to 
rollback the mail message if there is an error processing in 
Camel.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>delete</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Deletes the messages after they have been processed. 
This is done by setting the <code>DELETED</code> flag on the mail message. If 
<code>false</code>, the <code>SEEN</code> flag is set instead. As of 
<strong>Camel 2.10</strong> you can override this configuration option by 
setting a header with the key <code>delete</code> to determine if the mail 
should be deleted or not.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>unseen</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>It is possible to confi
 gure a consumer endpoint so that it processes only unseen messages (that is, 
new messages) or all messages. Note that Camel always skips deleted messages. 
The default option of <code>true</code> will filter to only unseen messages. 
POP3 does not support the <code>SEEN</code> flag, so this option is not 
supported in POP3; use IMAP instead. <strong>Important:</strong> This option is 
<strong>not</strong> in use if you also use <code>searchTerm</code> options. 
Instead if you want to disable unseen when using <code>searchTerm</code>'s then 
add <code>searchTerm.unseen=false</code> as a term.</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>copyTo</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> 
Consumer only. After processing a mail message, it can be copied to a mail 
folder with the given name. You can override this configuration value, wi
 th a header with the key <code>copyTo</code>, allowing you to copy messages to 
folder names configured at runtime.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>fetchSize</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>-1</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Sets the maximum number of 
messages to consume during a poll. This can be used to avoid overloading a mail 
server, if a mailbox folder contains a lot of messages. Default value of 
<code>-1</code> means no fetch size and all messages will be consumed. Setting 
the value to 0 is a special corner case, where Camel will not consume any 
messages at all.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>alternativeBodyHeader</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CamelMailAlternativeBody</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the key to an IN 
message header 
 that contains an alternative email body. For example, if you send emails in 
<code>text/html</code> format and want to provide an alternative mail body for 
non-HTML email clients, set the alternative mail body with this key as a 
header.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>debugMode</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Enable debug mode on the underlying mail 
framework. The SUN Mail framework logs the debug messages to 
<code>System.out</code> by default.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>connectionTimeout</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>30000</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The connection timeout in 
milliseconds. Default is 30 seconds.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>consumer.initia
 lDelay</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Milliseconds before the polling 
starts.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>consumer.delay</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>60000</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Camel will poll the mailbox only once a 
minute by default to avoid overloading the mail server.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>consumer.useFixedDelay</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Set to <code>true</code> to use 
a fixed delay between polls, otherwise fixed rate is used. See <a shape="rect" 
class="external-link" 
href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html
 " rel="nofollow">ScheduledExecutorService</a> in JDK for 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>disconnect</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.8.3/2.9:</strong> Whether 
the consumer should disconnect after polling. If enabled this forces Camel to 
connect on each poll.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>closeFolder</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.10.4:</strong> Whether the 
consumer should close the folder after polling. Setting this option to 
<code>false</code> and having <code>disconnect=false</code> as well, then the 
consumer keep the folder open between polls.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>mail.XXX</cod
 e></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Set any <a shape="rect" class="external-link" 
href="http://java.sun.com/products/javamail/javadocs/index.html"; 
rel="nofollow">additional java mail properties</a>. For instance if you want to 
set a special property when using POP3 you can now provide the option directly 
in the URI such as: <code>mail.pop3.forgettopheaders=true</code>. You can set 
multiple such options, for example: 
<code>mail.pop3.forgettopheaders=true&amp;mail.mime.encodefilename=true</code>.</p></td></tr><tr><td
 colspan="1" rowspan="1" 
class="confluenceTd"><p><code>mapMailMessage</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Specifies 
whether Camel should map the received mail message to Camel body/headers. If 
set to true, the body of the mail message 
 is mapped to the body of the Camel IN message and the mail headers are mapped 
to IN headers. If this option is set to false then the IN message contains a 
raw <code>javax.mail.Message</code>. You can retrieve this raw message by 
calling 
<code>exchange.getIn().getBody(javax.mail.Message.class)</code>.</p></td></tr><tr><td
 colspan="1" rowspan="1" 
class="confluenceTd"><p><code>maxMessagesPerPoll</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Specifies the maximum number of messages to 
gather per poll. By default, no maximum is set. Can be used to set a limit of 
e.g. 1000 to avoid downloading thousands of files when the server starts up. 
Set a value of 0 or negative to disable this option.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>javaMailSender</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan=
 "1" class="confluenceTd"><p>Specifies a pluggable <span style="color: 
rgb(34,34,34);">org.apache.camel.component.</span><span style="color: 
rgb(34,34,34);">mail.JavaMailSender</span> instance in order to use a custom 
email implementation.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>ignoreUnsupportedCharset</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Option to let Camel ignore 
unsupported charset in the local JVM when sending mails. If the charset is 
unsupported then <code>charset=XXX</code> (where <code>XXX</code> represents 
the unsupported charset) is removed from the <code>content-type</code> and it 
relies on the platform default instead.</p></td></tr><tr><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>sslContextParameters</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1
 " class="confluenceTd"><p><strong>Camel 2.10:</strong> Reference to a 
<code>org.apache.camel.util.jsse.SSLContextParameters</code> in the <a 
shape="rect" class="external-link" 
href="http://camel.apache.org/registry.html";>Registry</a>.&#160; This reference 
overrides any configured SSLContextParameters at the component level.&#160; See 
<a shape="rect" class="external-link" 
href="http://camel.apache.org/http4.html#HTTP4-UsingtheJSSEConfigurationUtility";>Using
 the JSSE Configuration Utility</a>.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>searchTerm</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> 
Refers to a <code>javax.mail.search.SearchTerm</code> which allows to filter 
mails based on search criteria such as subject, body, from, sent after a 
certain date etc. See further below for examples.</p></td></tr><tr><td 
colspan="1" rowspan
 ="1" class="confluenceTd"><p><code>searchTerm.xxx</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> To 
configure search terms directly from the endpoint uri, which supports a limited 
number of terms defined by the 
<code>org.apache.camel.component.mail.SimpleSearchTerm</code> class. See 
further below for examples.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p class="p1"><code>sortTerm</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><code>null</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15: </strong>To 
configure the sortTerms that <span>IMAP</span> supports to sort the searched 
mails<strong><strong>. </strong></strong>You may need to define an array of<p 
class="p1"><code>com.sun.mail.imap.sortTerm</code> i<span>n the registry first 
and #name to reference it in this URI option.</span></p></td><
 /tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p 
class="p1"><code>postProcessAction</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><code>null</code></td><td colspan="1" rowspan="1" 
class="confluenceTd"><strong>Camel 2.15:</strong> Refers to a<code 
style="line-height: 1.4285715;">org.apache.camel.component.mail.</code><span 
style="line-height: 1.4285715;"><code>MailBoxPostProcessAction</code> for doing 
post processing tasks on the mailbox once the normal processing 
ended.</span></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><code>skipFailedMessage</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><strong>Camel 2.15.1:</strong> If the mail 
consumer cannot retrieve a given mail message, then this option allows to skip 
the message and move on to retrieve the next mail message. The default behavior 
would be the consumer throws an exception and no mails from the ba
 tch would be able to be routed by Camel.</td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><code>handleFailedMessage</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td 
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15.1:</strong> If 
the mail consumer cannot retrieve a given mail message, then this option allows 
to handle the caused exception by the consumer's error handler. By enable the 
bridge error handler on the consumer, then the Camel routing error handler can 
handle the exception instead. <span>The default behavior would be the consumer 
throws an exception and no mails from the batch would be able to be routed by 
Camel.</span></td></tr></tbody></table></div></div><h3 id="Mail-SSLsupport">SSL 
support</h3><p>The underlying mail framework is responsible for providing SSL 
support. &#160;You may either configure SSL/TLS support by completely 
specifying the necessary Java Mail API configuration options, or you may provide
  a configured SSLContextParameters through the component or endpoint 
configuration.</p><h4 id="Mail-UsingtheJSSEConfigurationUtility">Using the JSSE 
Configuration Utility</h4><p>As of <strong>Camel 2.10</strong>, the mail 
component supports SSL/TLS configuration through the <a shape="rect" 
href="camel-configuration-utilities.html">Camel JSSE Configuration 
Utility</a>.&#160; This utility greatly decreases the amount of component 
specific code you need to write and is configurable at the endpoint and 
component levels.&#160; The following examples demonstrate how to use the 
utility with the mail component.</p><h5 
id="Mail-Programmaticconfigurationoftheendpoint">Programmatic configuration of 
the endpoint</h5><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[KeyStoreParameters ksp = new 
KeyStoreParameters();
 ksp.setResource(&quot;/users/home/server/truststore.jks&quot;);
 ksp.setPassword(&quot;keystorePassword&quot;);


Reply via email to