---
title: HyperPortal - email support
slug: hyper-portal/hyperportal-email-support
docTags: 
createdAt: 2020-06-23T10:04:55.000Z
---

## Summary

There is the possibility to use email sending from the workflows as an automated task, as well as in particular situations (e.g., import/export result), or programmatically via code. Email infrastructure is mostly based on [AWS SES](https://aws.amazon.com/ses/).

## Templating

Emails templates can be constructed via an external integrated plugin called [Stripo](https://stripo.email/pt/) that allows each tenant to have multiple templates that can be used when sending emails - `https://<TENANT_ID>.hyperportal.org/emails/templates`.

![](https://archbee-doc-uploads.s3.amazonaws.com/5goaGPkGyPYxtK7K75CEC/2J72zwSFTxnJ_PazQ2-SR_image.png "Stripo email templating engine")

Templates use handlebars as a templating engine. More information on the specific handlebars config in AWS can be seen in the documentation: [https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-advanced.html](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-advanced.html)&#x20;

Important to note that in the platform you can preview the email and set default parameters for when variables are not defined.

## Workflows automated email task

Within the workflows, you can insert a node responsible for the automated sending of an email. Besides the common and expected properties of reply-to, to, cc, bcc; there is also the advanced template selection based on workflow property values (template mapping property).

![](https://archbee-doc-uploads.s3.amazonaws.com/5goaGPkGyPYxtK7K75CEC/cW7jJtLYNQXaHcg3y2anj_image.png "Workflows automated email sending task properties")

When executing, the email templating engine is fed with the full expanded process data.

## Programmatic usage

Code for this functionality exists in the `mail` microservice within the `lambdas-monorepo` repository.

::Image[]{src="https://api.archbee.com/api/presign/5goaGPkGyPYxtK7K75CEC/vpfpA4zFYaYSWf2PgXa6P_image.png" size="40" caption="mail microservice" position="center" width="286" height="793" darkWidth="286" darkHeight="793" showCaption="true"}

There are available lambdas for sending emails via API and internal invocation.

## AWS SES (Simple Email Service)

In order to send an email via SES, the domain to be used needs to be verified, as well as any specific email addresses

::Image[]{src="https://api.archbee.com/api/presign/5goaGPkGyPYxtK7K75CEC/L3E-mYUTW_bGr_0HtpnMQ_image.png" size="70" caption="AWS SES identity management" position="center" width="516" height="175" darkWidth="516" darkHeight="175" showCaption="true"}

You can also check in the console, statistics of all sent emails (deliveries, rejects, bounces, complaints): [https://eu-west-1.console.aws.amazon.com/ses/home?region=eu-west-1[#dashboard:](https://eu-west-1.console.aws.amazon.com/ses/home?region=eu-west-1#dashboard:)](https://eu-west-1.console.aws.amazon.com/ses/home?region=eu-west-1#dashboard:)

![](https://archbee-doc-uploads.s3.amazonaws.com/5goaGPkGyPYxtK7K75CEC/sk9xyaiEhi1Aar34veXd8_image.png "AWS SES metrics")

Correct use of email sending is very important because of reputation. Spamming CANNOT be done using SES or via our personal or our client domains. If you notice that any client is using our platform for spamming, cease immediately his use of emailing functionality. It is highly important to keep track of the reputation of our account.

::Image[]{src="https://api.archbee.com/api/presign/5goaGPkGyPYxtK7K75CEC/oQN8JqLrH1SL0IvIe_UKl_image.png" size="40" caption="AWS SES reputation" position="center" width="374" height="270" darkWidth="374" darkHeight="270" showCaption="true"}

If any client complains that an email does not reach its destination, have a look at the suppression list: [https://eu-west-1.console.aws.amazon.com/ses/home?region=eu-west-1#suppressionlist-removal:](https://eu-west-1.console.aws.amazon.com/ses/home?region=eu-west-1#suppressionlist-removal:)

We rely on SES templates to send most of our platform emails, and those are stored in the SES template repository: [https://eu-west-1.console.aws.amazon.com/ses/home?region=eu-west-1#email-templates-list:](https://eu-west-1.console.aws.amazon.com/ses/home?region=eu-west-1#email-templates-list:)

In order to configure environment events and sending IPs, configuration sets can be used. We have currently split staging and production environments - [https://eu-west-1.console.aws.amazon.com/ses/home?region=eu-west-1#configuration-set-list:](https://eu-west-1.console.aws.amazon.com/ses/home?region=eu-west-1#configuration-set-list:) - check the code to understand which one is used.

