docs/versioned_docs/version-3.0.0-LTS/tj-setup/smtp-setup/configuration.md
This feature is exclusive to self-hosted ToolJet, allowing you to configure a custom SMTP email server. This feature allows you to choose your own email server, which helps to seamlessly send emails for various purposes, including invitations, password reset requests, and notifications.
There are two ways to setup your email server in ToolJet:
Both methods are designed to ensure that your ToolJet instance can send emails as needed, depending on your setup preferences and security requirements.
<div style={{paddingTop:'24px'}}>Before you begin, ensure you have:
:::info If you have upgraded from a version prior to v2.62.0, the SMTP variables in your .env file will automatically be mapped to the UI. :::
<div style={{paddingTop:'24px'}}>Navigate to the Settings section in ToolJet.
Select the Email protocol (SMTP) tab.
Toggle the switch to enable Email protocol (SMTP).
Configure the following fields:
| Field | Description | Example |
|---|---|---|
| Host | SMTP server hostname | smtp.gmail.com |
| Port | SMTP server port number | 587 |
| User | SMTP account username | [email protected] |
| Password | SMTP account password | a13d0sd344 |
| Sender's email | Email address of the sender | [email protected] |
Click Save changes to apply the new SMTP configuration.
ToolJet allows you to configure SMTP settings using environment variables. You can enable a toggle in the Email protocol (SMTP) settings to apply or fetch the configuration directly from your .env file.
Example Environment Variables:
```javascript
[email protected]
SMTP_USERNAME=your-username
SMTP_PASSWORD=your-password
SMTP_DOMAIN=smtp.mailgun.org
SMTP_PORT=587
SMTP_SSL=false
SMTP_DISABLED=false
```