1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00

fix: more docs

This commit is contained in:
Ivar Conradi Østhus 2021-05-21 22:26:13 +02:00
parent 18fa981949
commit ef37da7326
No known key found for this signature in database
GPG Key ID: 31AC596886B0BD09
3 changed files with 19 additions and 20 deletions

View File

@ -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',
},
});
```

View File

@ -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

View File

@ -129,7 +129,7 @@
"title": "Database Setup"
},
"deploy/email": {
"title": "Email"
"title": "Email service"
},
"deploy/getting_started": {
"title": "Getting Started"