Endpoint for Camel Mail.
Name | Kind | Group | Required | Default | Type | Enum | Description |
---|---|---|---|---|---|---|---|
host | path | common | true | java.lang.String | The mail server host name | ||
port | path | common | int | The port number of the mail server | |||
closeFolder | parameter | consumer | true | boolean | Whether the consumer should close the folder after polling. Setting this option to false and having disconnect=false as well, then the consumer keep the folder open between polls. | ||
copyTo | parameter | consumer | java.lang.String | 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 copyTo, allowing you to copy messages to folder names configured at runtime. | |||
delay | parameter | consumer | 60000 | long | Milliseconds before the next poll. | ||
delete | parameter | consumer | boolean | Deletes the messages after they have been processed. This is done by setting the DELETED flag on the mail message. If false, the SEEN flag is set instead. As of Camel 2.10 you can override this configuration option by setting a header with the key delete to determine if the mail should be deleted or not. | |||
disconnect | parameter | consumer | boolean | Whether the consumer should disconnect after polling. If enabled this forces Camel to connect on each poll. | |||
handleFailedMessage | parameter | consumer | boolean | 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. The default behavior would be the consumer throws an exception and no mails from the batch would be able to be routed by Camel. | |||
maxMessagesPerPoll | parameter | consumer | int | 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. | |||
peek | parameter | consumer | true | boolean | Will mark the javax.mail.Message as peeked before processing the mail message. This applies to IMAPMessage messages types only. By using peek the mail will not be eager marked as SEEN on the mail server, which allows us to rollback the mail message if there is an error processing in Camel. | ||
sendEmptyMessageWhenIdle | parameter | consumer | boolean | If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead. | |||
skipFailedMessage | parameter | consumer | boolean | 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. | |||
unseen | parameter | consumer | true | boolean | Whether to limit by unseen mails only. | ||
fetchSize | parameter | consumer (advanced) | -1 | int | 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 -1 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. | ||
folderName | parameter | consumer (advanced) | INBOX | java.lang.String | The folder to poll. | ||
mapMailMessage | parameter | consumer (advanced) | true | boolean | 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 javax.mail.Message. You can retrieve this raw message by calling exchange.getIn().getBody(javax.mail.Message.class). | ||
pollStrategy | parameter | consumer (advanced) | org.apache.camel.spi.PollingConsumerPollStrategy | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. | |||
postProcessAction | parameter | consumer (advanced) | org.apache.camel.component.mail.MailBoxPostProcessAction | Refers to an {@link MailBoxPostProcessAction} for doing post processing tasks on the mailbox once the normal processing ended. | |||
from | parameter | producer | camel@localhost | java.lang.String | The from email address | ||
replyTo | parameter | producer | java.lang.String | The Reply-To recipients (the receivers of the response mail). Separate multiple email addresses with a comma. | |||
subject | parameter | producer | java.lang.String | The Subject of the message being sent. Note: Setting the subject in the header takes precedence over this option. | |||
javaMailSender | parameter | producer (advanced) | org.apache.camel.component.mail.JavaMailSender | To use a custom {@link org.apache.camel.component.mail.JavaMailSender} for sending emails. | |||
alternativeBodyHeader | parameter | advanced | CamelMailAlternativeBody | java.lang.String | Specifies the key to an IN message header that contains an alternative email body. For example, if you send emails in text/html 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. | ||
binding | parameter | advanced | org.apache.camel.component.mail.MailBinding | Sets the binding used to convert from a Camel message to and from a Mail message | |||
connectionTimeout | parameter | advanced | 30000 | int | The connection timeout in milliseconds. | ||
contentType | parameter | advanced | text/plain | java.lang.String | The mail message content type. Use text/html for HTML mails. | ||
contentTypeResolver | parameter | advanced | org.apache.camel.component.mail.ContentTypeResolver | Resolver to determine Content-Type for file attachments. | |||
debugMode | parameter | advanced | boolean | Enable debug mode on the underlying mail framework. The SUN Mail framework logs the debug messages to System.out by default. | |||
exchangePattern | parameter | advanced | InOnly | org.apache.camel.ExchangePattern | InOnly RobustInOnly InOut InOptionalOut OutOnly RobustOutOnly OutIn OutOptionalIn |
Sets the default exchange pattern when creating an exchange | |
headerFilterStrategy | parameter | advanced | org.apache.camel.spi.HeaderFilterStrategy | To use a custom {@link org.apache.camel.spi.HeaderFilterStrategy} to filter headers. | |||
ignoreUnsupportedCharset | parameter | advanced | boolean | Option to let Camel ignore unsupported charset in the local JVM when sending mails. If the charset is unsupported then charset=XXX (where XXX represents the unsupported charset) is removed from the content-type and it relies on the platform default instead. | |||
ignoreUriScheme | parameter | advanced | boolean | Option to let Camel ignore unsupported charset in the local JVM when sending mails. If the charset is unsupported then charset=XXX (where XXX represents the unsupported charset) is removed from the content-type and it relies on the platform default instead. | |||
synchronous | parameter | advanced | false | boolean | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | ||
useInlineAttachments | parameter | advanced | boolean | Whether to use disposition inline or attachment. | |||
searchTerm | parameter | filter | javax.mail.search.SearchTerm | Refers to a {@link javax.mail.search.SearchTerm} which allows to filter mails based on search criteria such as subject, body, from, sent after a certain date etc. | |||
backoffErrorThreshold | parameter | scheduler | int | The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. | |||
backoffIdleThreshold | parameter | scheduler | int | The number of subsequent idle polls that should happen before the backoffMultipler should kick-in. | |||
backoffMultiplier | parameter | scheduler | int | To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured. | |||
greedy | parameter | scheduler | boolean | If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages. | |||
initialDelay | parameter | scheduler | 1000 | long | Milliseconds before the first poll starts. | ||
runLoggingLevel | parameter | scheduler | TRACE | org.apache.camel.LoggingLevel | TRACE DEBUG INFO WARN ERROR OFF |
The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that. | |
scheduledExecutorService | parameter | scheduler | java.util.concurrent.ScheduledExecutorService | Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool. | |||
scheduler | parameter | scheduler | org.apache.camel.spi.ScheduledPollConsumerScheduler | spring quartz2 |
To use a cron scheduler from either camel-spring or camel-quartz2 component | ||
schedulerProperties | parameter | scheduler | java.util.Map |
To configure additional properties when using a custom scheduler or any of the Quartz2, Spring based scheduler. | |||
startScheduler | parameter | scheduler | true | boolean | Whether the scheduler should be auto started. | ||
timeUnit | parameter | scheduler | MILLISECONDS | java.util.concurrent.TimeUnit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS |
Time unit for initialDelay and delay options. | |
useFixedDelay | parameter | scheduler | true | boolean | Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. | ||
sortTerm | parameter | sort | com.sun.mail.imap.SortTerm[] | Sorting order for messages. Only natively supported for IMAP. Emulated to some degree when using POP3 or when IMAP server does not have the SORT capability. | |||
dummyTrustManager | parameter | security | boolean | To use a dummy security setting for trusting all certificates. Should only be used for development mode, and not production. | |||
password | parameter | security | java.lang.String | The password for login | |||
sslContextParameters | parameter | security | org.apache.camel.util.jsse.SSLContextParameters | To configure security using SSLContextParameters. | |||
username | parameter | security | java.lang.String | The username for login |
A {@link org.apache.camel.Consumer Consumer} which consumes messages from JavaMail using a {@link javax.mail.Transport Transport} and dispatches them to the {@link Processor}