Commits

Micha Kops committed 3b59803 Draft

IMAP example added.

  • Participants
  • Parent commits 74700f5

Comments (0)

Files changed (1)

File src/main/scala/com/hascode/tutorial/ImapExample.scala

+package com.hascode.tutorial
+import org.apache.camel.scala.dsl.builder.RouteBuilder
+import org.apache.camel.CamelContext
+import org.apache.camel.impl.DefaultCamelContext
+import org.apache.camel.scala.dsl.builder.RouteBuilderSupport
+
+object ImapExample extends App {
+  val context: CamelContext = new DefaultCamelContext
+  val routeBuilder = new RouteBuilder {
+    //TODO: use/bootstrap greenmail server
+    from("imap://hostname[:port]") --> ("file:data/outbox");
+  }
+  context.addRoutes(routeBuilder)
+  context.start
+  while (true) {}
+}
+