Add mail driver (#3205)
* Add node mailer packages * Init mailer module * Add logger transport * Use env variable to get transport * Revert "Add node mailer packages" This reverts commit 3fb954f0caef94266f96ff5f08de750073ab3491. * Add nodemailer * Use driver pattern * Use logger * Fix yarn install * Code review returns * Add configuration examples for smtp * Fix merge conflict * Add missing packages * Fix ci
This commit is contained in:
@ -6,6 +6,8 @@ sidebar_custom_props:
|
||||
---
|
||||
|
||||
import OptionTable from '@site/src/theme/OptionTable'
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
## Frontend
|
||||
|
||||
@ -56,6 +58,53 @@ import OptionTable from '@site/src/theme/OptionTable'
|
||||
['FRONT_AUTH_CALLBACK_URL', 'http://localhost:3001/verify ', 'Callback used for Login page'],
|
||||
]}></OptionTable>
|
||||
|
||||
### Email
|
||||
|
||||
<OptionTable options={[
|
||||
['EMAIL_DRIVER', 'logger', "Email driver: 'logger' (to log emails in console) or 'smtp'"],
|
||||
['EMAIL_SMTP_HOST', '', 'Email Smtp Host'],
|
||||
['EMAIL_SMTP_PORT', '', 'Email Smtp Port'],
|
||||
['EMAIL_SMTP_USER', '', 'Email Smtp User'],
|
||||
['EMAIL_SMTP_PASSWORD', '', 'Email Smtp Password'],
|
||||
]}></OptionTable>
|
||||
|
||||
#### Email SMTP Server configuration examples
|
||||
|
||||
<Tabs>
|
||||
|
||||
<TabItem value="Gmail" label="Gmail" default>
|
||||
|
||||
You will need to provision an [App Password](https://support.google.com/accounts/answer/185833).
|
||||
- EMAIL_SMTP_HOST=smtp.gmail.com
|
||||
- EMAIL_SERVER_PORT=465
|
||||
- EMAIL_SERVER_USER=gmail_email_address
|
||||
- EMAIL_SERVER_PASSWORD='gmail_app_password'
|
||||
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="Office365" label="Office365">
|
||||
|
||||
Keep in mind that if you have 2FA enabled, you will need to provision an [App Password](https://support.microsoft.com/en-us/account-billing/manage-app-passwords-for-two-step-verification-d6dc8c6d-4bf7-4851-ad95-6d07799387e9).
|
||||
- EMAIL_SMTP_HOST=smtp.office365.com
|
||||
- EMAIL_SERVER_PORT=587
|
||||
- EMAIL_SERVER_USER=office365_email_address
|
||||
- EMAIL_SERVER_PASSWORD='office365_password'
|
||||
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="Smtp4dev" label="Smtp4dev">
|
||||
|
||||
**smtp4dev** is a fake SMTP email server for development and testing.
|
||||
- Run the smtp4dev image: `docker run --rm -it -p 8090:80 -p 2525:25 rnwood/smtp4dev`
|
||||
- Access the smtp4dev ui here: [http://localhost:8090](http://localhost:8090)
|
||||
- Set the following env variables:
|
||||
- EMAIL_SERVER_HOST=localhost
|
||||
- EMAIL_SERVER_PORT=2525
|
||||
|
||||
</TabItem>
|
||||
|
||||
</Tabs>
|
||||
|
||||
### Storage
|
||||
|
||||
<OptionTable options={[
|
||||
@ -82,6 +131,7 @@ import OptionTable from '@site/src/theme/OptionTable'
|
||||
|
||||
|
||||
### Data enrichment and AI
|
||||
|
||||
<OptionTable options={[
|
||||
['OPENROUTER_API_KEY', '', "The API key for openrouter.ai, an abstraction layer over models from Mistral, OpenAI and more"]
|
||||
]}></OptionTable>
|
||||
@ -96,6 +146,7 @@ import OptionTable from '@site/src/theme/OptionTable'
|
||||
]}></OptionTable>
|
||||
|
||||
### Telemetry
|
||||
|
||||
<OptionTable options={[
|
||||
['TELEMETRY_ENABLED', 'true', 'Change this if you want to disable telemetry'],
|
||||
['TELEMETRY_ANONYMIZATION_ENABLED', 'true', 'Telemetry is anonymized by default, you probably don\'t want to change this'],
|
||||
|
||||
Reference in New Issue
Block a user