All Projects → camunda-community-hub → camunda-bpm-mail

camunda-community-hub / camunda-bpm-mail

Licence: Apache-2.0 license
Mail connectors for Camunda Platform 7

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to camunda-bpm-mail

twitter-for-geoevent
ArcGIS GeoEvent Server sample Twitter connectors for sending and receiving tweets.
Stars: ✭ 21 (-67.19%)
Mutual labels:  connector
lttrs-android
No-frills, easy to use, easy to maintain Email client for Android based on the JSON Meta Application Protocol (JMAP).
Stars: ✭ 176 (+175%)
Mutual labels:  email
thymeflow
Installer for Thymeflow, a personal knowledge management system.
Stars: ✭ 27 (-57.81%)
Mutual labels:  email
Mail
基于 Net.Mail 封装的发送邮件工具类。仅需一行代码,发送邮件。支持自定义邮件发出邮箱、发出方名字等。 支持SSL加密发送。 多个接收人、抄送人。支持群发独显。 支持添加附件、多个附件。 目前大部分主流邮箱全支持。
Stars: ✭ 87 (+35.94%)
Mutual labels:  email
sender policy flattener
Compact large SPF chains into flat blocks of IP addresses
Stars: ✭ 25 (-60.94%)
Mutual labels:  email
email-checker
Provides email verification on the go.
Stars: ✭ 116 (+81.25%)
Mutual labels:  email
horusec-platform
Horusec Platform is a set of web services that integrate with the Horusec CLI to facilitate the visualization and management of found vulnerabilities.
Stars: ✭ 32 (-50%)
Mutual labels:  email
nuxt-mail
Adds email sending capability to a Nuxt.js app. Adds a server route, an injected variable, and uses nodemailer to send emails.
Stars: ✭ 62 (-3.12%)
Mutual labels:  email
Email-Spammer
Great script for sending and spaming emails! gmail, yahoo, outlook, hotmail.
Stars: ✭ 79 (+23.44%)
Mutual labels:  email
email-providers
A list of common eMail providers.
Stars: ✭ 17 (-73.44%)
Mutual labels:  email
SpamgourmetReloaded
SpamgourmetReloaded is a remake of the original spamgourmet.com service - made in Kotlin. The project includes a mailserver and a webinterface.
Stars: ✭ 18 (-71.87%)
Mutual labels:  email
Maily-Form
Forms on any website
Stars: ✭ 29 (-54.69%)
Mutual labels:  email
news-api
Go newsletter API backed by DynamoDB
Stars: ✭ 63 (-1.56%)
Mutual labels:  email
puppeteer-email
Email automation driven by headless chrome.
Stars: ✭ 135 (+110.94%)
Mutual labels:  email
email-reply-parser
🔎 Node library for parsing plain text email content.
Stars: ✭ 31 (-51.56%)
Mutual labels:  email
bulk-email-sender
Send Templatized Dynamic Emails Automatically
Stars: ✭ 30 (-53.12%)
Mutual labels:  email
content-reminder
⏰ A GitHub Action that reminds you to share your own content
Stars: ✭ 28 (-56.25%)
Mutual labels:  email
gmail-gitlab-filtering
Google Apps Script for Gmail to filter and sort email from GitLab
Stars: ✭ 84 (+31.25%)
Mutual labels:  email
maildog
🐶 Hosting your own email forwarding service on AWS and managing it with Github Actions
Stars: ✭ 381 (+495.31%)
Mutual labels:  email
trualias
Mentally computable verification codes for email aliases implemented as a postfix tcp table or milter; uses asyncio.
Stars: ✭ 33 (-48.44%)
Mutual labels:  email

camunda-platform-7-mail

License Build project with Maven

A community extension for Camunda Platform 7 to integrate emails in a process and interact with them. It was previously known as camunda-bpm-mail.

Sample process

Features

  • send mail
  • poll mails
  • delete mails
  • react on incoming mails

Install

Requirements:

  • Camunda Platform 7 >= 7.5.0
  • Java 8

For Embedded Process Engine

Add camunda-bpm-mail-core as dependency to your application. Using Maven, you have to add the following lines to your POM:

<dependency>
  <groupId>org.camunda.bpm.extension</groupId>
  <artifactId>camunda-bpm-mail-core</artifactId>
  <version>1.2.0</version>
</dependency>

For Shared Process Engine

Add camunda-bpm-mail-core-1.2.0.jar to your application server (e.g. apache-tomcat-8.0.24\lib).

Also make sure that you included the following dependencies:

If you use Wildfly, follow the special instructions.

How to use it?

The extension is build on top of the Connectors API and provide some connectors for interacting with emails. The connectors can be used inside a process as implementation of a service task and are referenced by id. Use the Camunda Modeler to configure it.

<serviceTask id="sendMail" name="Send Mail Task">
  <extensionElements>
    <camunda:connector>
      <camunda:connectorId>mail-send</camunda:connectorId>
      <!-- input / output mapping -->
    </camunda:connector>
  </extensionElements>
</serviceTask>

See the connectors user guide how to configure the process engine to use connectors.

Send Mails

icon

Connector-Id: mail-send

Input parameter Type Required?
from String no (read from config)
fromAlias String no (read from config)
to String yes
cc String no
bcc String no
subject String yes
text String no
html String no
fileNames List of String (path to files) yes

The text or html body can also generated from a template (e.g. using FreeMarkeer). See the example.

Poll Mails

icon

Connector-Id: mail-poll

Input parameter Type Required?
folder String (e.g. 'INBOX') no (read from config)
download-attachements Boolean no (read from config)
Output parameter Type
mails List of Mail

If download-attachements is set to true then it stores the attachments of the mails in the folder which is provided by the configuration. The path of the stored attachments can be get from the Attachments of the Mail.

By default, the polled mails are marked as read. If the property mail.imaps.peek is set to true then the mails are just polled and not marked as read.

Delete Mails

icon

Connector-Id: mail-delete

Input parameter Type Required?
folder String (e.g. 'INBOX') no (read from config)
mails List of Mail no1
messageIds List of String no1
messageNumbers List of Integer no1

1 Either mails, messageIds or messageNumbers have to be set.

React on incoming Mails

icon

The extension provide the MailNotificationService to react on incoming mails (e.g. start a process instance or correlate a message). You can register handlers / consumers which are invoked when a new mail is received.

MailNotificationService notificationService = new MailNotificationService(configuration);

notificationService.registerMailHandler(mail -> {
  runtimeService.startProcessInstanceByKey("process",
    Variables.createVariables().putValue("mail", mail));
});

notificationService.start();

// ...

notificationService.stop();

If you use a mail handler and enabled downloadAttachments in the configuration then it stores the attachments of the mail before invoking the handler. Otherwise, you can also trigger the download manual by calling Mail.downloadAttachments().

How to configure it?

By default, the extension loads the configuration from a properties file mail-config.properties on classpath. You can change the lookup path using the environment variable MAIL_CONFIG. If you want to lookup a file on the classpath, use the classpath: prefix (e.g. classpath:/my-application.config).

An example configuration can look like:

# send mails via SMTP
mail.transport.protocol=smtp

mail.smtp.host=smtp.gmail.com
mail.smtp.port=465
mail.smtp.auth=true
mail.smtp.ssl.enable=true
mail.smtp.socketFactory.port=465
mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory

# poll mails via IMAPS
mail.store.protocol=imaps

mail.imaps.host=imap.gmail.com
mail.imaps.port=993
mail.imaps.timeout=10000

# if peek = false then the polled mails are marked as read
mail.imaps.peek=false

# additional config
mail.poll.folder=INBOX
[email protected]
mail.sender.alias=User Inc

mail.attachment.download=true
mail.attachment.path=attachments

# credentials
[email protected]
mail.password=PASSWORD

You can find some sample configurations at extension/core/configs. If you use a mail provider which has no configuration yet, feel free to add one. You can verify your configuration with the integration tests.

Examples

The following examples shows how to use the connectors and services.

  • Pizza Order
    • poll mails
    • send mail with generated text body
    • delete mail
  • Print Service
    • using the MailNotificationService
    • send mail with attachment

Next Steps

Depends on the input of the community. Some ideas:

  • provide element templates for camunda modeler (not supported yet)
  • integration of file process variables
  • spring-based configuration

Contribution

Found a bug? Please report it using Github Issues.

Want to extend, improve or fix a bug in the extension? Pull Requests are very welcome.

Want to discuss something? The Camunda Forum might be the best place for it.

FAQ

See also

Can't send / receive mails from Gmail

It can be that Google blocks the requests because it estimates your application as unsafe. You may also received an email from Google. To fix this go to https://www.google.com/settings/security/lesssecureapps and enable less secure apps.

Notification service throws exceptions (IDLE-Mode)

Make sure that you don't have an older version (< 1.5.5) of javamail in your project. By default, the camunda process engine / distribution includes an old version (1.4.1) of javamail (i.e. transitively from commons-email).

License

Apache License, Version 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].