# Email (SMTP)

Send alert and agent notifications by email through your SMTP server

- Category: Apps
- Runs in: the Phloem cloud

Send alerts and Hamming's messages by email, through your own SMTP server.

## What you need
- An SMTP server Phloem can reach, its port, and the TLS mode it expects
- A username and password, unless the server is an unauthenticated relay
- A sender address the server accepts

## Connect
1. In the console, open **Connectors**, choose **Add connector**, then **Email (SMTP)**.
2. Enter **SMTP host**, **Port** and **Security**: **STARTTLS (recommended)** on `587`, **Implicit TLS (SMTPS)** on `465`, or **None (plaintext)** on `25`.
3. Enter **Username** and **Password**, or leave both blank for an unauthenticated relay.
4. Enter **From address** (`Phloem Alerts <alerts@example.com>`). It must contain an email address; recipients see it in the From header.
5. Save and test. The test opens a session with the server, signs in if a username is set, and shows the server's answer. It sends no email.

## What Hamming can do
- **Send an email** to one address, in plain text, with an optional subject. Each email needs your approval by default. An org admin can set **Changes** on the connector to **Off**, **Needs approval** or **Allowed**.

## Notes
- It only sends plain-text email. Phloem does not read a mailbox through it.
- With no subject, the first line of the body (up to 120 characters) becomes the subject.
- To send alerts by email, open **Alerts**, add a role, and choose this connector with an address such as `conductor@example.com`.

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| SMTP host | Text | Yes |  |
| Port | Number | Yes | 587 for STARTTLS, 465 for implicit TLS, 25 for none. |
| Security | One of | Yes |  |
| Username | Text | No |  |
| Password | Secret | No | Leave blank for an unauthenticated relay. |
| From address | Text | Yes | What recipients see in the From header. |
