Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adueck/haskell-mailer
A personal newsletter mailer app in Haskell
https://github.com/adueck/haskell-mailer
Last synced: about 1 month ago
JSON representation
A personal newsletter mailer app in Haskell
- Host: GitHub
- URL: https://github.com/adueck/haskell-mailer
- Owner: adueck
- License: mit
- Created: 2024-07-31T15:32:18.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-19T20:24:33.000Z (3 months ago)
- Last Synced: 2024-10-12T19:35:52.584Z (2 months ago)
- Language: Haskell
- Size: 946 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# haskell-mailer
![E2E Testing](https://github.com/adueck/haskell-mailer/actions/workflows/ci.yml/badge.svg)
A simple personal newsletter mailing app.
### 🚧 TODO: IN PROGRESS
- Email preview
## Requires
- [Cabal](https://hackage.haskell.org/package/Cabal)
- [Postgres](https://www.postgresql.org/) instance
- An SMTP account for sending mail## Running
The following environment variables need to be set **for production**:
- `MYMAILER_URL`: The URL of the app
- `MYMAILER_SENDER`: FROM Sender Address
- `MYMAILER_ADMIN_EMAIL`: The e-mail address to send admin messages to
- `MYMAILER_DOMAIN`: SMTP domain
- `MYMAILER_LOGIN`: SMTP login name
- `MYMAILER_PASSWORD`: SMTP password
- `MYMAILER_PORT`: SMTP port (defaults to 465 if `MYMAILER_DOMAIN` is set)
- `MYMAILER_DB`: Postgres DB name
- `MYMAILER_DB_HOST`: Postgres DB host
- `MYMAILER_DB_PASSWORD`: Postgres DB password
- `MYMAILER_AUTH_PASSWORD`: Password for app login/auth (unprotected if left blank)For development and testing, these can all be left blank.
Then run the app using cabal
```bash
$ cabal run
```This will launch a dev server at `http://localhost:8080`. Postgres and mailpit will need to be running for dev.
## End to end testing
Requires [Mailpit](https://mailpit.axllent.org/) to be installed in path OR to be running on `localhost:8025` (API) and `localhost:1025` (SMTP).
```
$ npm run test
```