> Documentation index: [Saleor](/llms.txt) · [This section](/developer/llms.txt)
> Source: https://docs.saleor.io/developer/app-store/apps/smtp/configuration

# SMTP App Configuration

You will need SMTP server credentials. Email templates are created using [MJML](https://mjml.io/) language and can be edited in the app dashboard. Dynamic parts of the email (for example the number of the order) can be added using [Handlebars](https://handlebarsjs.com/). For more advanced template features you can use [handlebars-helpers](https://github.com/helpers/handlebars-helpers).

info

Starting with version 2.0.0, the app only allows a curated subset of [handlebars-helpers](https://github.com/helpers/handlebars-helpers) for security reasons. Templates that use any other helper will fail validation. The allowed helpers are:

-   **Array**: `after`, `arrayify`, `before`, `eachIndex`, `filter`, `first`, `forEach`, `inArray`, `isArray`, `itemAt`, `join`, `equalsLength`, `last`, `length`, `map`, `pluck`, `reverse`, `some`, `sort`, `sortBy`, `withAfter`, `withBefore`, `withFirst`, `withGroup`, `withLast`, `withSort`, `unique`
-   **Code**: `gist`, `jsfiddle`
-   **Collection**: `isEmpty`, `iterate`
-   **Comparison**: `and`, `compare`, `contains`, `default`, `eq`, `gt`, `gte`, `has`, `isFalsey`, `isTruthy`, `ifEven`, `ifNth`, `ifOdd`, `is`, `isnt`, `lt`, `lte`, `neither`, `not`, `or`, `unlessEq`, `unlessGt`, `unlessLt`, `unlessGteq`, `unlessLteq`
-   **Date**: `year`, `moment`, `date`
-   **HTML**: `attr`, `css`, `js`, `sanitize`, `ul`, `ol`, `thumbnailImage`
-   **I18n**: `i18n`
-   **Inflection**: `inflect`, `ordinalize`
-   **Math**: `abs`, `add`, `avg`, `ceil`, `divide`, `floor`, `minus`, `modulo`, `multiply`, `plus`, `random`, `remainder`, `round`, `subtract`, `sum`, `times`
-   **Misc**: `option`, `noop`, `withHash`
-   **Number**: `bytes`, `addCommas`, `phoneNumber`, `toAbbr`, `toExponential`, `toFixed`, `toFloat`, `toInt`, `toPrecision`
-   **Path**: `absolute`, `dirname`, `relative`, `basename`, `stem`, `extname`, `segments`
-   **Regex**: `toRegex`, `test`
-   **String**: `append`, `camelcase`, `capitalize`, `capitalizeAll`, `center`, `chop`, `dashcase`, `dotcase`, `downcase`, `ellipsis`, `hyphenate`, `isString`, `lowercase`, `occurrences`, `pascalcase`, `pathcase`, `plusify`, `prepend`, `raw`, `remove`, `removeFirst`, `replace`, `replaceFirst`, `sentence`, `snakecase`, `split`, `startsWith`, `titleize`, `trim`, `trimLeft`, `trimRight`, `truncate`, `truncateWords`, `upcase`, `uppercase`
-   **URL**: `encodeURI`, `escape`, `decodeURI`, `url_encode`, `url_decode`, `urlResolve`, `urlParse`, `stripQuerystring`, `stripProtocol`

<a id="before-you-start---server-credentials"></a>

## Before you start - server credentials

Using this provider requires access to the SMTP server. Depending on your needs, you may use:

-   [Amazon SES](https://aws.amazon.com/ses/)
-   [Mailgun](https://www.mailgun.com/)
-   [Mailtrap](https://mailtrap.io/)

<a id="creating-configuration"></a>

## Creating configuration

1.  Open the SMTP app in Saleor Dashboard
2.  Click on `Add configuration`
3.  Provide SMTP server credentials for your SMTP server
4.  Click on `Save provider`. The application will redirect automatically to the configuration details
5.  Enter sender details, which will be displayed as the author of the emails for your customers. Click on `Save provider`
6.  In the events section, choose which emails should be sent. You can also modify the template of the emails.
7.  Click on `Save provider`

Now the application is configured and emails will be sent.

<a id="testing"></a>

## Testing

If you don't have access to the SMTP server, you can use an external service for testing, for example:

-   [Mailtrap](https://mailtrap.io/)
-   [MailSlurp](https://www.mailslurp.com/)

Both services provide a free plan that will allow you to test email delivery.

tip

Both services have similar functionality. The following guide will use MailSlurp as an example.

1.  Create an account at [MailSlurp](https://www.mailslurp.com/)
2.  Create a new inbox - [documentation](https://www.mailslurp.com/guides/creating-inboxes/)
3.  Choose `SMTP` as the inbox type
4.  Choose `Virtual inbox`. This will create an inbox that captures all emails, so none will be sent to the original addressee
5.  Configure the SMTP provider in the application:
    -   Fill SMTP server credentials form
    -   Use inbox address as sender email

More information can be found in [the official guide](https://help.mailtrap.io/article/109-getting-started-with-mailtrap-email-testing).

<a id="local-development"></a>

### Local development

If you are a developer working on EAM and don't want to use an external service, you can use [MailHog](https://github.com/mailhog/MailHog), which comes pre-configured in this repository.

Requirements:

-   Docker is installed
-   `docker compose` command is available

To start the service:

1.  Open the EAM app folder in terminal
2.  Use the command `docker compose up`

Mailhog will start the SMTP server and web interface. Now you can update provider configuration:

-   Host: `localhost`
-   Port: `1025`
-   The rest can be left empty

All emails will be captured by the MailHog service. To inspect emails, open `http://localhost:8025/` in your browser.
