This documentation is for WSO2 Complex Event Processor 4.0.0. View documentation for the latest release.
WSO2 Complex Event Processor is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
<adapterConfig type="email">
    <property key="mail.smtp.from">email-address</property>
    <property key="mail.smtp.user">user-name</property>
    <property key="mail.smtp.password">password</property>
    <property key="mail.smtp.host">smtp.gmail.com</property>
    <property key="mail.smtp.port">587</property>
    <property key="mail.smtp.starttls.enable">true</property>
    <property key="mail.smtp.auth">true</property>
    <!-- Thread Pool Related Properties -->
    <property key="maxThread">100</property>
    <property key="keepAliveTimeInMillis">20000</property>
    <property key="jobQueueSize">10000</property>
</adapterConfig>
Note

Creating an email event publisher

For instructions on creating an email event publisher, see Configuring CEP to Create Alerts.

Configuring global properties

The following global properties can be set for the Email event publisher type in the <CEP_HOME>/repository/conf/input-event-adapters.xml file. These properties apply to all the publishers of the email type. If a global property available by default is removed, the default value of the property is considered.

Info

Custom properties cannot be added as global properties.

Property KeyDescriptionData TypeDefault Value
mail.smtp.fromThe email address used by the publisher to publish events.String abcd@gmail.com
mail.smtp.userThe username used by the publisher to publish events via email.Stringabcd
mail.smtp.passwordThe password used by the publish events via email.Stringxxxx
mail.smtp.hostThe host of the email server.Stringsmtp.gmail.com
mail.smtp.portThe port of the email server.Integer587
mail.smtp.starttls.enableThis property specifies whether STARTTLS encryption is enabled or not. STARTTLS is an extension which enables a plain text connection to be upgraded to an encrypted (SSL or TLS) connection.Booleantrue
mail.smtp.authThis property specifies whether SMTP authentication is enabled or not.Booleantrue
minThreadThe minimum number of threads (including idle threads) that should be available in the thread pool at a given time.Integer8
maxThreadThe maximum number of threads (including idle threads) that should be available in the thread pool at a given time.Integer100
keepAliveTimeInMillisThe maximum number of milliseconds that idle threads should be kept alive when the total number of threads in the pool exceeds the number of cores in the machine.Integer20000
jobQueueSizeThe maximum number of milliseconds that idle threads should be kept alive when the total number of threads in the pool exceeds the number of cores in the machine.Integer10000

Configuring adapter properties

Specify the Dynamic Adapter Properties, when creating an email event publisher using the management console as shown below.

email event publisher

Info

After entering the above adapter properties, select the Message Format which you want to apply on the published events. Also, click Advanced to define custom output mappings based on the Message Format you selected. For more information on custom output mapping types, see Publishing Events in Various Event Formats.

 

...