From ef37da7326ad55cbb634f9022ac7fac384e643e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Fri, 21 May 2021 22:26:13 +0200 Subject: [PATCH] fix: more docs --- docs/deploy/email.md | 35 +++++++++++++++++------------------ docs/sdks/node.md | 2 +- website/i18n/en.json | 2 +- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/docs/deploy/email.md b/docs/deploy/email.md index 3c5354fcbd..2ca7d3e58a 100644 --- a/docs/deploy/email.md +++ b/docs/deploy/email.md @@ -1,14 +1,12 @@ --- id: email -title: Email +title: Email service --- -# Email service - -New since v4.0.0 is an email service allowing us to send reset password and welcome mails to new users. -In order for this to work you'll need to tell unleash what SMTP service you'd like to send mails from. +New since Unleash v4.0.0 is an email service allowing us to send reset password and welcome mails to new users. In order for this to work you'll need to tell unleash what SMTP service you'd like to send mails from. If the service is not configured you'll see a log line every time you add a new user saying + ```bash [2021-05-07T12:59:04.572] [WARN] routes/user-controller.ts - email was not sent to the user because email configuration is lacking ``` @@ -19,17 +17,18 @@ Depending on your deploy case there are different ways of configuring this servi ### Docker -With docker, we configure the mail service via environment variables. +With docker, we configure the mail service via environment variables. You'll want to at least include EMAIL_HOST, EMAIL_USER, EMAIL_PASSWORD and EMAIL_SENDER Environment variables: -* EMAIL_HOST - Your SMTP server address -* EMAIL_PORT - Your SMTP server port - defaults to 567 -* EMAIL_SECURE - whether to use SMTPS - set to `false` or `true` - defaults to false, -* EMAIL_USER - the username to authenticate against your SMTP server -* EMAIL_PASSWORD - the password for your SMTP user -* EMAIL_SENDER - which address should reset-password mails and welcome mails be sent from - defaults to `noreply@unleash-hosted.com` which is probably not what you want. + +- EMAIL_HOST - Your SMTP server address +- EMAIL_PORT - Your SMTP server port - defaults to 567 +- EMAIL_SECURE - whether to use SMTPS - set to `false` or `true` - defaults to false, +- EMAIL_USER - the username to authenticate against your SMTP server +- EMAIL_PASSWORD - the password for your SMTP user +- EMAIL_SENDER - which address should reset-password mails and welcome mails be sent from - defaults to `noreply@unleash-hosted.com` which is probably not what you want. ### Node @@ -39,11 +38,11 @@ With node, we can configure this when calling Unleash's start method. const unleash = require('unleash-server'); unleash.start({ - email: { - host: 'myhost', - smtpuser: 'username', - smtppass: 'password', - sender: 'noreply@mycompany.com' - } + email: { + host: 'myhost', + smtpuser: 'username', + smtppass: 'password', + sender: 'noreply@mycompany.com', + }, }); ``` diff --git a/docs/sdks/node.md b/docs/sdks/node.md index 3a9bd10e7a..a3d096eb25 100644 --- a/docs/sdks/node.md +++ b/docs/sdks/node.md @@ -50,7 +50,7 @@ setInterval(() => { Please note that in the above example we put the isEnabled-evaluation inside the setInterval method. This is required in the small example to make sure that the feature toggle is not evaluated, and application exits, before the client SDK have been able to synchronize with the Unleash-hosted API. State is kept in memory by the client SDK (and synchronizes with the Unleash-hosted API in the background). This is done to prefer performance over update speed. You can read more about the [Unleash architecture](https://www.unleash-hosted.com/articles/our-unique-architecture). -It can also be nice to notice that if you use an undefined feature toggle the Unleash SDK will return false instead of crashing your application. The SDK will also report metrics back to Unleash-hosted on feature toggle usage, which makes it [possible to spot toggles not yet defined](../user_guide/discover-unknown-toggles). And this is a very neat way to help you debug if something does not work as expected. +It can also be nice to notice that if you use an undefined feature toggle the Unleash SDK will return false instead of crashing your application. The SDK will also report metrics back to Unleash-hosted on feature toggle usage, which makes it \_possible to spot toggles not yet defined. And this is a very neat way to help you debug if something does not work as expected. ## Step 4: Provide the Unleash-context diff --git a/website/i18n/en.json b/website/i18n/en.json index d380cc0c40..967e953a08 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -129,7 +129,7 @@ "title": "Database Setup" }, "deploy/email": { - "title": "Email" + "title": "Email service" }, "deploy/getting_started": { "title": "Getting Started"