# Liferay (SMTP)

> Send email from your Liferay instance through MailBlastr over SMTP.

Liferay sends notifications and account emails over SMTP. Configure your instance to use the MailBlastr relay and authenticate with your API key so those emails are delivered and tracked in your dashboard.

## Prerequisites

- A MailBlastr [API key](https://www.mailblastr.com/docs/api-keys/overview).
- A [verified domain](https://www.mailblastr.com/docs/domains/managing) to send from.

## 1. Get your SMTP credentials

You'll configure Liferay with the following MailBlastr credentials:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Host` | string | No | `smtp.mailblastr.com` |
| `Port` | number | No | `465` (implicit TLS) or `587` (STARTTLS). |
| `Username` | string | No | `mailblastr` |
| `Password` | string | No | Your API key, e.g. `mb_xxxxxxxxx`. |

## 2. Configure mail in Liferay

Logged in as the admin user, navigate to **Control Panel → Server Administration → Mail**, then enter the MailBlastr SMTP details:

| Setting | Value |
| --- | --- |
| Outgoing SMTP Server | `smtp.mailblastr.com` |
| Outgoing Port | `465` |
| Enable StartTLS | `True` |
| User Name | `mailblastr` |
| Password | Your API key, e.g. `mb_xxxxxxxxx` |

Replace the password with an existing API key or create a new one on the [API keys](https://www.mailblastr.com/docs/api-keys/overview) page. For the additional JavaMail properties, you can use:

```properties
mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.starttls.required=true
```

> **Warning:** The from-address Liferay sends with must be on a domain you have verified in MailBlastr, otherwise sends will be rejected.
