Element Summary

ElementDescriptionClass
componentMail Componentorg.apache.servicemix.mail.MailComponent
pollerThis is the polling endpoint for the mail component.org.apache.servicemix.mail.MailPollerEndpoint
senderthis is the sending endpoint for the mail componentorg.apache.servicemix.mail.MailSenderEndpoint

Element Detail

Element: component

ElementTypeDescription
endpoints(poller | sender)*
executorFactory<spring:bean/>The executor factory to use to create the executor. If none is provided, one will be retrieved from the JBI container when the component is deployed into ServiceMix 3.x, or a default implementation will be used.

Element: poller

AttributeTypeDescription
concurrentPollingxs:boolean

Sets whether more than one poll can be active at a time (true means yes). Default value is false.

connectionxs:string

Specifies the connection URI used to connect to a mail server.

Templates:
   <protocol>://<user>@<host>[:<port>][/<folder>]?password=<password>
      OR
   <protocol>://<host>[:<port>][/<folder>]?user=<user>;password=<password>

Details:

Name Description
protocol the protocol to use (example: pop3 or imap)
user the user name used to log into an account
host the name or ip address of the mail server
port the port number to use (optional)
folder the folder to poll from (optional)
password the password for the login

Examples:
   imap://lhein@imapserver:143/INBOX?password=mypass
   pop3://pop3server/INBOX?user=me@myhome.org;password=mypass

   The default value is null

customTrustManagersxs:string

Specifies one or more trust manager classes separated by a semicolon (;).
These classes have to implement the Trustmanager interface and need to provide an empty default constructor to be valid.

If you want to accept all security certificates without a check you may consider using the DummyTrustManager class. It is actually only an empty stub without any checking logic.
But be aware that this will be a security risk in production environments.

   The default value is null

debugModexs:boolean

Specifies if the JavaMail is run in DEBUG mode. This means that while connecting to server and processing mails a detailed log is written to debug output.
This mode is very handy if you are experiencing problems with your mail server connection and you want to find out what is going wrong in communication with the server.

   true - the debug mode is enabled
   false - the debug mode is disabled

   The default value is false

delayxs:long

Sets the amount of time in milliseconds that the endpoint should wait before making the first poll.

deleteProcessedMessagesxs:boolean

This flag is used to indicate what happens to a processed mail polled from a mail folder. If it is set to true the mail will be deleted after it was sent into the bus successfully. If set to false the mail will reside inside the mail folder but will be marked as already seen.
If the sending of the mail results in an error, the mail will not be deleted / marked and reprocessed on next run of the polling cycle.

   The default value is false

endpointxs:string

Get the endpoint implementation.

firstTimexs:date

Sets the date on which the first poll will be executed. If a delay is also set using setDelay, the delay interval will be added after the date specified.

interfaceNamexs:QName

Get the qualified name of the endpoint interface.

maxFetchSizexs:integer

This sets the maximum amount of mails to process within one polling cycle. If the maximum amount is reached all other mails in "unseen" state will be skipped.

   The default value is -1 (unlimited)

periodxs:long

Sets the number of milliseconds between polling attempts.

processOnlyUnseenMessagesxs:boolean

This flag is used to indicate whether all mails are polled from a mail folder or only the unseen mails are processed.

If it is set to true only the unseen mails will be processed.
If it is set to false all mails will be processed.

   The default value is true

servicexs:QName

Get the service qualified name of the endpoint.

targetEndpointxs:stringthe name of the endpoint to which requests are sent
targetInterfacexs:QNamethe QName of the interface to which requests are sent
targetOperationxs:QNamethe QName of the operation to which requests are sent
targetServicexs:QNamethe QName of the service to which requests are sent
targetUrixs:string

Gets the target URI of the consumer endpoint.

ElementTypeDescription
customProperties<spring:bean/>

Specifies a java.util.Map which may contain additional properties for the connection.

Example for disabling TOP for POP3 headers:
 key: "mail.pop3.disabletop"
 value: "true"

   The default value is null

marshaler<spring:bean/>

With this method you can specify a marshaler class which provides the logic for converting a mail into a normalized message. This class has to extend the abstract class AbstractMailMarshaler or an extending class. If you don't specify a marshaler, the DefaultMailMarshaler will be used.

scheduler<spring:bean/>

Sets a custom scheduler implementation if you need more fine-grained control over the polling schedule.

storage<spring:bean/>

Specifies a org.apache.servicemix.store.Store object which will be used for storing the identifications of already processed messages.
This store is only used with the POP3 protocol and if unseen mails are processed only.

   The default value is null

Element: sender

AttributeTypeDescription
connectionxs:string

Specifies the connection URI used to connect to a mail server.

Templates:
   <protocol>://<user>@<host>[:<port>][/<folder>]?password=<password>
      OR
   <protocol>://<host>[:<port>][/<folder>]?user=<user>;password=<password>

Details:

Name Description
protocol the protocol to use (example: pop3 or imap)
user the user name used to log into an account
host the name or ip address of the mail server
port the port number to use (optional)
folder the folder to poll from (optional)
password the password for the login

Example:
   smtp://lhein@myserver?password=myPass

   The default value is null

customTrustManagersxs:string

Specifies one or more trust manager classes separated by a semicolon (;).
These classes have to implement the Trustmanager interface and need to provide an empty default constructor to be valid.

If you want to accept all security certificates without a check you may consider using the DummyTrustManager class. It is actually only an empty stub without any checking logic.
But be aware that this will be a security risk in production environments.

   The default value is null

debugModexs:boolean

Specifies if the JavaMail is run in DEBUG mode. This means that while connecting to server and processing mails a detailed log is written to debug output.
This mode is very handy if you are experiencing problems with your mail server connection and you want to find out what is going wrong in communication with the server.

   true - the debug mode is enabled
   false - the debug mode is disabled

   The default value is false

endpointxs:string

Get the endpoint implementation.

interfaceNamexs:QName

Get the qualified name of the endpoint interface.

receiverxs:string

Specifies the receiver address(es) of the mail which is being sent.

   The default value is null

senderxs:string

Specifies the sender address of the mail which is being sent.

   The default value is no-reply@localhost

servicexs:QName

Get the service qualified name of the endpoint.

ElementTypeDescription
customProperties<spring:bean/>

Specifies a java.util.Map which may contain additional properties for the connection.

Example for disabling TOP for POP3 headers:
 key: "mail.pop3.disabletop"
 value: "true"

   The default value is null

ignoreMessageProperties(<spring:bean/>)*

Specifies a java.util.List which may contain message properties to skip.

Example for skipping all kind of addresses from the normalized message:
 value: "org.apache.servicemix.mail.to"
 value: "org.apache.servicemix.mail.cc"
 value: "org.apache.servicemix.mail.bcc"
 value: "org.apache.servicemix.mail.from"
 value: "org.apache.servicemix.mail.replyto"

   The default value is null

marshaler<spring:bean/>

With this method you can specify a marshaler class which provides the logic for converting a normalized message into a mail. This class has to extend the abstract class AbstractMailMarshaler or an extending class. If you don't specify a marshaler, the DefaultMailMarshaler will be used.