Skip to content

Commit

Permalink
Document outgoing SMTP config for #36
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-kent committed Feb 24, 2015
1 parent fe6169b commit 693d659
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ You can configure MailHog using command line options or environment variables:
| MH_MONGO_URI | -mongo-uri | 127.0.0.1:27017 | MongoDB host and port
| MH_SMTP_BIND_ADDR | -smtp-bind-addr | 0.0.0.0:1025 | Interface and port for SMTP server to bind to
| MH_STORAGE | -storage | memory | Set message storage: memory / mongodb
| MH_OUTGOING_SMTP | -outgoing-smtp | | JSON file defining outgoing SMTP servers

#### Note on HTTP bind addresses

Expand All @@ -22,3 +23,29 @@ be used allowing both to co-exist on one port.

The values must match in a string comparison. Resolving to the same host and
port combination isn't enough.

### Outgoing SMTP configuration

Outgoing SMTP servers can be set in web UI when releasing a message, and can
be temporarily persisted for later use in the same session.

To make outgoing SMTP servers permanently available, create a JSON file with
the following structure, and set `MH_OUTGOING_SMTP` or `-outgoing-smtp`.

```json
{
"server name": {
"name": "server name",
"host": "...",
"port": 587,
"email": "...",
"username": "...",
"password": "...",
"mechanism": "PLAIN",
}
}
```

Only `name`, `host` and `port` are required.

`mechanism` can be `PLAIN` or `CRAM-MD5`.

0 comments on commit 693d659

Please sign in to comment.