i am trying to read a gmail using the routebuilder() of apache camel.
@Component
class ReadEmailRouteBuilder(var stockLocationProperty:
StockLocationProperty) : RouteBuilder() {
override fun configure() {
//TODO
}
}
This is the start i have to use and i have tried many ways but it never worked, can someone help me?
Dependending on what protocol you are using (IMAP for instance), the answer could look like :
from("imaps://imap.gmail.com?username={{gmail.username}}&password={{gmail.password}}&delete=false&unseen=true&consumer.delay=60000")
.process(new MailAttachmentProcessor())
.to("file://gmails");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.