From 265f4d9d642d5f9bde0b48319a1a4b35a0f6259d Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Thu, 20 Jun 2024 22:59:45 -0400 Subject: [PATCH] doc: document testing Puter with email --- doc/testing_with_email.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 doc/testing_with_email.md diff --git a/doc/testing_with_email.md b/doc/testing_with_email.md new file mode 100644 index 00000000..d1156c63 --- /dev/null +++ b/doc/testing_with_email.md @@ -0,0 +1,31 @@ +# Testing with Email + +Testing anything involving email is really simple using [mailhog](https://github.com/mailhog/MailHog) + +### Step 1: Configure email service + +In your `config.json` for Puter (`volatile/config/config.json` usually, `/var/puter/config.json` in containers), +add this entry to the `"services`" map: + +```javascript + "services": { + + // ... there are probably other service configs + + "email": { + "host": "localhost", + "port": 1025 + } + } +``` + +### Step 2: Install and run mailhog + +Follow the instructions on [MailHog](https://github.com/mailhog/MailHog)'s +repository, or install through your distro's package manager. + +Run the command: `mailhog`. + +You should now have an inbox at [http://127.0.0.1:8025](http://127.0.0.1:8025). + +Every email that Puter sends will show up on this page.