Skip to main content

Mailing Component

net.democritus:mailing-component::3.1.0````

The mailing component adds a mailing capability to an NS applicationNS Application (NSApplication). A pre-built software stack that provides common enterprise application functionality such as CRUD, search, authentication, and business process modeling out of the box.. The component provides an interface to create emails and adds a workflow implementation that handles the email delivery.

Model​

Configuring your mail server​

The mailing component works by leveraging an external mail server.

Implementation​

Within a task implementation, you can create new Email instances that will be sent by the workflow

  public TaskResult<Void> perform(ParamTargetContext<ExampleDetails> parameter) {
Context context = parameter.getContext();
// ...
EmailDetails email = new EmailDetails();
email.setFromAddress("...");
email.setToAddresses("...");
email.setSubject("...");
email.setContent("...");

EmailAgent emailAgent = EmailAgent.getEmailAgent(context);
CrudsResult<DataRef> email = emailAgent.create(email);
// ...
}