This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 8ca863d  Regen
8ca863d is described below

commit 8ca863d3c5b45fbe0d3d1397b31cd1606ca39364
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Fri Apr 24 06:45:59 2020 +0200

    Regen
---
 .../modules/ROOT/pages/mail-component.adoc         | 68 ++++++++++------------
 1 file changed, 30 insertions(+), 38 deletions(-)

diff --git a/docs/components/modules/ROOT/pages/mail-component.adoc 
b/docs/components/modules/ROOT/pages/mail-component.adoc
index 8200a43..dc8c610 100644
--- a/docs/components/modules/ROOT/pages/mail-component.adoc
+++ b/docs/components/modules/ROOT/pages/mail-component.adoc
@@ -253,9 +253,6 @@ with the following path and query parameters:
 // endpoint options: END
 
 
-
-
-
 === Sample endpoints
 
 Typically, you specify a URI with login credentials as follows (taking
@@ -339,7 +336,7 @@ Registry registry = ...
 registry.bind("sslContextParameters", scp);
 ...
 from(...)
-&nbsp; &nbsp; 
.to("smtps://smtp.google.com?username=u...@gmail.com&password=password&sslContextParameters=#sslContextParameters");
+    
.to("smtps://smtp.google.com?username=u...@gmail.com&password=password&sslContextParameters=#sslContextParameters");
 
----------------------------------------------------------------------------------------------------------------------------------
 
 [[Mail-SpringDSLbasedconfigurationofendpoint]]
@@ -359,7 +356,7 @@ Spring DSL based configuration of endpoint
 
 === Configuring JavaMail Directly
 
-Camel uses SUN JavaMail, which only trusts certificates issued by well
+Camel uses Jakarta JavaMail, which only trusts certificates issued by well
 known Certificate Authorities (the default JVM trust configuration). If
 you issue your own certificates, you have to import the CA certificates
 into the JVM's Java trust/key store files, override the default JVM
@@ -408,10 +405,10 @@ pre-configured settings.
 
 [source,java]
 
------------------------------------------------------------------------------------------------------------
-        Map<String, Object> headers = new HashMap<String, Object>();
-        headers.put("to", "davscl...@apache.org");
+Map<String, Object> headers = new HashMap<String, Object>();
+headers.put("to", "davscl...@apache.org");
 
-        
template.sendBodyAndHeaders("smtp://admin@localhost?to=i...@mycompany.com", 
"Hello World", headers);
+template.sendBodyAndHeaders("smtp://admin@localhost?to=i...@mycompany.com", 
"Hello World", headers);
 
------------------------------------------------------------------------------------------------------------
 
 == Multiple recipients for easier configuration
@@ -422,8 +419,8 @@ settings in an endpoint URI. For example:
 
 [source,java]
 
------------------------------------------------------------------------------------------------
-        Map<String, Object> headers = new HashMap<String, Object>();
-        headers.put("to", "davscl...@apache.org ; jstrac...@apache.org ; 
ningji...@apache.org");
+Map<String, Object> headers = new HashMap<String, Object>();
+headers.put("to", "davscl...@apache.org ; jstrac...@apache.org ; 
ningji...@apache.org");
 
------------------------------------------------------------------------------------------------
 
 The preceding example uses a semicolon, `;`, as the separator character.
@@ -477,13 +474,10 @@ interval, `consumer.delay`, as 60000 milliseconds = 60 
seconds.
 
 [source,java]
 -------------------------------------------------------
-from("imap://ad...@mymailserver.com
-     password=secret&unseen=true&delay=60000")
+from("imap://ad...@mymailserver.com?password=secret&unseen=true&delay=60000")
     .to("seda://mails");
 -------------------------------------------------------
 
-In this sample we want to send a mail to multiple recipients:
-
 == Sending mail with attachment sample
 
 
@@ -551,27 +545,27 @@ mail from java code:
 
 [source,java]
 
---------------------------------------------------------------------------------
-    public void process(Exchange exchange) throws Exception {
-        // the API is a bit clunky so we need to loop
-        Map<String, DataHandler> attachments = 
exchange.getIn().getAttachments();
-        if (attachments.size() > 0) {
-            for (String name : attachments.keySet()) {
-                DataHandler dh = attachments.get(name);
-                // get the file name
-                String filename = dh.getName();
-
-                // get the content and convert it to byte[]
-                byte[] data = exchange.getContext().getTypeConverter()
-                                  .convertTo(byte[].class, 
dh.getInputStream());
-
-                // write the data to a file
-                FileOutputStream out = new FileOutputStream(filename);
-                out.write(data);
-                out.flush();
-                out.close();
-            }
+public void process(Exchange exchange) throws Exception {
+    // the API is a bit clunky so we need to loop
+    Map<String, DataHandler> attachments = exchange.getIn().getAttachments();
+    if (attachments.size() > 0) {
+        for (String name : attachments.keySet()) {
+            DataHandler dh = attachments.get(name);
+            // get the file name
+            String filename = dh.getName();
+
+            // get the content and convert it to byte[]
+            byte[] data = exchange.getContext().getTypeConverter()
+                              .convertTo(byte[].class, dh.getInputStream());
+
+            // write the data to a file
+            FileOutputStream out = new FileOutputStream(filename);
+            out.write(data);
+            out.flush();
+            out.close();
         }
-   }
+    }
+}
 
---------------------------------------------------------------------------------
 
 As you can see the API to handle attachments is a bit clunky but it's
@@ -612,7 +606,7 @@ the Splitter as shown below
 
  
 
-From Camel 2.16 onwards you can also split the attachments as byte[] to
+You can also split the attachments as byte[] to
 be stored as the message body. This is done by creating the expression
 with boolean true
 
@@ -621,12 +615,10 @@ with boolean true
 SplitAttachmentsExpression split = SplitAttachmentsExpression(true);
 --------------------------------------------------------------------
 
-And then use the expression with the splitter eip.
+And then use the expression with the splitter EIP.
 
 == Using custom SearchTerm
 
-*Since Camel 2.11*
-
 You can configure a `searchTerm` on the `MailEndpoint` which allows you
 to filter out unwanted mails.
 

Reply via email to