You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/docs/configuration/authentication/email.mdx
+149-4Lines changed: 149 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Email setup
3
-
description: This guide explains how to configure the secure email verification/password reset. You can configure it to work with various email services, including Gmail and custom mail servers.
3
+
description: This guide explains how to configure the secure email verification/password reset. You can configure it to work with various email services, including Gmail, Mailgun, and custom mail servers.
4
4
---
5
5
6
6
# Email verification and Password Reset
@@ -9,6 +9,35 @@ For a quick overview, refer to the user guide provided here: [Password Reset](/d
9
9
10
10
## General setup
11
11
12
+
LibreChat supports multiple email providers:
13
+
-**Mailgun API** - Recommended for servers that block SMTP ports
14
+
-**SMTP Services** - Traditional email sending via Gmail, Outlook, or custom mail servers
15
+
16
+
### Common Configuration
17
+
18
+
These variables are used by both Mailgun and SMTP:
['EMAIL_FROM_NAME', 'string', 'From name (defaults to APP_TITLE if not set).','EMAIL_FROM_NAME=LibreChat'],
24
+
]}
25
+
/>
26
+
27
+
### Mailgun Configuration (Recommended)
28
+
29
+
Mailgun is particularly useful for deployments on servers that block SMTP ports to prevent spam. When both `MAILGUN_API_KEY` and `MAILGUN_DOMAIN` are set, LibreChat will use Mailgun instead of SMTP.
30
+
31
+
<OptionTable
32
+
options={[
33
+
['MAILGUN_API_KEY', 'string', 'Your Mailgun API key (required for Mailgun).','MAILGUN_API_KEY='],
34
+
['MAILGUN_DOMAIN', 'string', 'Your Mailgun domain, e.g., mg.yourdomain.com (required for Mailgun).','MAILGUN_DOMAIN='],
35
+
['MAILGUN_HOST', 'string', 'Custom Mailgun API host (optional). Use https://api.eu.mailgun.net for EU region.','MAILGUN_HOST=https://api.mailgun.net'],
36
+
]}
37
+
/>
38
+
39
+
### SMTP Configuration
40
+
12
41
**Basic Configuration**
13
42
14
43
If you want to use one of the predefined services, configure only these variables:
@@ -19,8 +48,6 @@ For more info about supported email services: https://community.nodemailer.com/2
19
48
['EMAIL_SERVICE', 'string', 'Email service (e.g., Gmail, Outlook).','EMAIL_SERVICE='],
20
49
['EMAIL_USERNAME', 'string', 'Username for authentication.','EMAIL_USERNAME='],
21
50
['EMAIL_PASSWORD', 'string', 'Password for authentication.','EMAIL_PASSWORD='],
@@ -39,7 +66,30 @@ If you want to use a generic SMTP service or need advanced configuration for one
39
66
/>
40
67
41
68
<Callouttype="warning"title="Warning">
42
-
**Failing to perform either of the below setups will result in LibreChat using the unsecured password reset! This allows anyone to reset any password on your server immediately, without mail being sent at all!**
69
+
**Failing to configure either Mailgun or SMTP properly will result in LibreChat using the unsecured password reset! This allows anyone to reset any password on your server immediately, without mail being sent at all!**
70
+
</Callout>
71
+
72
+
## Setup with Mailgun
73
+
74
+
To set up Mailgun, follow these steps:
75
+
76
+
1. Sign up for a Mailgun account at [mailgun.com](https://www.mailgun.com/)
77
+
2. Add and verify your domain in the Mailgun dashboard
78
+
3. Navigate to the API Keys section and copy your Private API key
79
+
4. In the `.env` file, modify the variables as follows:
80
+
81
+
<OptionTable
82
+
options={[
83
+
['MAILGUN_API_KEY', 'string', 'Your Mailgun private API key', 'MAILGUN_API_KEY=your-mailgun-api-key'],
Copy file name to clipboardExpand all lines: pages/docs/configuration/dotenv.mdx
+22-3Lines changed: 22 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1104,13 +1104,32 @@ For more information: **[LDAP/AD Authentication](/docs/configuration/authenticat
1104
1104
1105
1105
### Password Reset
1106
1106
1107
-
Email is used for account verification and password reset. See: **[Email setup](/docs/configuration/authentication/email)**
1107
+
Email is used for account verification and password reset. LibreChat supports both Mailgun API and traditional SMTP services. See: **[Email setup](/docs/configuration/authentication/email)**
1108
1108
1109
-
**Important Note**: All of the service or host, username, and password, and the From address must be set for email to work.
1109
+
**Important Note**: You must configure either Mailgun (recommended for servers that block SMTP) or SMTP for email to work.
1110
+
1111
+
> **Warning**: Failing to set valid values for either Mailgun or SMTP will result in LibreChat using the unsecured password reset!
1112
+
1113
+
#### Mailgun Configuration (Recommended)
1114
+
1115
+
Mailgun is particularly useful for deployments on servers that block SMTP ports. When both `MAILGUN_API_KEY` and `MAILGUN_DOMAIN` are set, LibreChat will use Mailgun instead of SMTP.
1116
+
1117
+
<OptionTable
1118
+
options={[
1119
+
['MAILGUN_API_KEY', 'string', 'Your Mailgun API key (required for Mailgun).','MAILGUN_API_KEY='],
1120
+
['MAILGUN_DOMAIN', 'string', 'Your Mailgun domain (required for Mailgun).','MAILGUN_DOMAIN=mg.yourdomain.com'],
1121
+
['MAILGUN_HOST', 'string', 'Custom Mailgun API host (optional). Use https://api.eu.mailgun.net for EU region.','MAILGUN_HOST=https://api.mailgun.net'],
Copy file name to clipboardExpand all lines: pages/docs/configuration/librechat_yaml/object_structure/agents.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ disableBuilder: false
74
74
75
75
**Default:** `[]` (empty list, all providers allowed)
76
76
77
-
**Note:** Must be one of the following:
77
+
**Note:** Must be one of the following, or a custom endpoint name as defined in your [configuration](/docs/configuration/librechat_yaml/object_structure/custom_endpoint#name):
Copy file name to clipboardExpand all lines: pages/docs/features/password_reset.mdx
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -23,17 +23,21 @@ description: This feature enables email-based password reset functionality for y
23
23
24
24
## Overview
25
25
26
-
This feature enables email-based password reset functionality for your LibreChat server. You can configure it to work with various email services, including Gmail and custom mail servers.
26
+
This feature enables email-based password reset functionality for your LibreChat server. You can configure it to work with various email services, including Mailgun API, Gmail, and custom mail servers.
27
27
28
28
## Key Features
29
29
30
-
- Supports multiple email services, including Gmail and custom mail servers
30
+
- Supports multiple email services:
31
+
-**Mailgun API** - Recommended for servers that block SMTP ports
32
+
-**Gmail** and other predefined SMTP services
33
+
-**Custom mail servers** with advanced SMTP configuration
31
34
- Allows for basic and advanced configuration options
32
-
- Enables email-based password reset functionality for your LibreChat server
35
+
- Enables secure email-based password reset functionality for your LibreChat server
33
36
34
37
## Setup Options
35
38
36
-
- Basic Configuration: Use predefined services with minimal configuration
37
-
- Advanced Configuration: Configure generic SMTP services or customize settings for predefined providers
39
+
-**Mailgun Configuration**: Use Mailgun's API for reliable email delivery, especially useful when SMTP ports are blocked
40
+
-**Basic SMTP Configuration**: Use predefined services like Gmail with minimal configuration
41
+
-**Advanced SMTP Configuration**: Configure generic SMTP services or customize settings for any mail provider
38
42
39
-
**For further details, refer to the configuration guides provided here: [Password Reset](/docs/configuration/authentication/email)**
43
+
**For detailed setup instructions, refer to the configuration guide: [Email Setup](/docs/configuration/authentication/email)**
0 commit comments