Google Mail
Manage messages in Google Mail.
What’s inside
-
Google Mail component, URI syntax:
google-mail:apiName/methodName -
Google Mail Stream component, URI syntax:
google-mail-stream:index
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-google-mail-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 34 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.google-mail-stream.access-token | OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for long term usage. | String | |
camel.component.google-mail-stream.application-name | Google mail application name. Example would be camel-google-mail/1.0 | String | |
camel.component.google-mail-stream.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.google-mail-stream.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean |
camel.component.google-mail-stream.client-factory | The client Factory. The option is a org.apache.camel.component.google.mail.GoogleMailClientFactory type. | GoogleMailClientFactory | |
camel.component.google-mail-stream.client-id | Client ID of the mail application | String | |
camel.component.google-mail-stream.client-secret | Client secret of the mail application | String | |
camel.component.google-mail-stream.configuration | The configuration. The option is a org.apache.camel.component.google.mail.stream.GoogleMailStreamConfiguration type. | GoogleMailStreamConfiguration | |
camel.component.google-mail-stream.delegate | Delegate for wide-domain service account | String | |
camel.component.google-mail-stream.enabled | Whether to enable auto configuration of the google-mail-stream component. This is enabled by default. | Boolean | |
camel.component.google-mail-stream.health-check-consumer-enabled | Used for enabling or disabling all consumer based health checks from this component | true | Boolean |
camel.component.google-mail-stream.health-check-producer-enabled | Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true. | true | Boolean |
camel.component.google-mail-stream.labels | Comma separated list of labels to take into account | String | |
camel.component.google-mail-stream.mark-as-read | Mark the message as read once it has been consumed | true | Boolean |
camel.component.google-mail-stream.max-results | Max results to be returned | 10 | Long |
camel.component.google-mail-stream.query | The query to execute on gmail box | is:unread | String |
camel.component.google-mail-stream.raw | Whether to store the entire email message in an RFC 2822 formatted and base64url encoded string (in JSon format), in the Camel message body. | false | Boolean |
camel.component.google-mail-stream.refresh-token | OAuth 2 refresh token. Using this, the Google Mail component can obtain a new accessToken whenever the current one expires - a necessity if the application is long-lived. | String | |
camel.component.google-mail-stream.scopes | Specifies the level of permissions you want a calendar application to have to a user account. See https://developers.google.com/identity/protocols/googlescopes for more info. Multiple scopes can be separated by comma. | String | |
camel.component.google-mail-stream.service-account-key | Sets .json file with credentials for Service account | String | |
camel.component.google-mail.access-token | OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for long term usage. | String | |
camel.component.google-mail.application-name | Google mail application name. Example would be camel-google-mail/1.0 | String | |
camel.component.google-mail.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.google-mail.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean |
camel.component.google-mail.client-factory | To use the GoogleCalendarClientFactory as factory for creating the client. Will by default use BatchGoogleMailClientFactory. The option is a org.apache.camel.component.google.mail.GoogleMailClientFactory type. | GoogleMailClientFactory | |
camel.component.google-mail.client-id | Client ID of the mail application | String | |
camel.component.google-mail.client-secret | Client secret of the mail application | String | |
camel.component.google-mail.configuration | To use the shared configuration. The option is a org.apache.camel.component.google.mail.GoogleMailConfiguration type. | GoogleMailConfiguration | |
camel.component.google-mail.delegate | Delegate for wide-domain service account | String | |
camel.component.google-mail.enabled | Whether to enable auto configuration of the google-mail component. This is enabled by default. | Boolean | |
camel.component.google-mail.lazy-start-producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.google-mail.refresh-token | OAuth 2 refresh token. Using this, the Google Mail component can obtain a new accessToken whenever the current one expires - a necessity if the application is long-lived. | String | |
camel.component.google-mail.scopes | Specifies the level of permissions you want a calendar application to have to a user account. See https://developers.google.com/identity/protocols/googlescopes for more info. Multiple scopes can be separated by comma. | String | |
camel.component.google-mail.service-account-key | Service account key in json format to authenticate an application as a service account. Accept base64 adding the prefix base64: | String |