|
1 | 1 | --- |
2 | 2 | title: SendGrid |
3 | | -description: Using SendGrid as the SMTP server |
| 3 | +description: Using SendGrid as an Email Provider |
4 | 4 | keywords: [email, SendGrid] |
5 | 5 | authors: [UsherFall] |
6 | 6 | --- |
7 | 7 |
|
8 | | -In this guide, we will be using SendGrid as the SMTP server. |
| 8 | +In this guide, we will use SendGrid as an email provider. |
9 | 9 |
|
10 | | -### Step 1: Create API key for your SendGrid account |
| 10 | +## Step 1: Create an API Key for Your SendGrid Account |
11 | 11 |
|
12 | | -Expand the **Settings** from the left navigation bar, click on the **API Keys** option from this list. Here, you will see all of your API keys if you have generated any in the past. To generate a new one, you need to click on **Create API Key** and pay attention to the permissions. |
| 12 | +Expand **Settings** from the left navigation bar, then click on **API Keys**. Here, you will see all previously generated API keys. To create a new one, click on **Create API Key** and configure the necessary permissions. |
13 | 13 |
|
14 | 14 |  |
15 | 15 |
|
16 | | -### Step 2: Sender Verification |
| 16 | +## Step 2: Sender Verification |
17 | 17 |
|
18 | | -Refer to the document to verify your email sender, you can choose **Single Sender Verification** or **Domain Authentication**: [Sender Identity](https://docs.sendgrid.com/for-developers/sending-email/sender-identity) |
| 18 | +To verify your email sender, choose between **Single Sender Verification** or **Domain Authentication** by referring to the official documentation: |
| 19 | +[Sender Identity](https://docs.sendgrid.com/for-developers/sending-email/sender-identity) |
19 | 20 |
|
20 | | -### Step 3: Configure Casdoor email Provider |
| 21 | +## Step 3: Configure Casdoor as an Email Provider |
21 | 22 |
|
22 | | -Now create an email provider in Casdoor. Fill in the required fields below: |
| 23 | +Create a SendGrid email provider in Casdoor and fill in the following fields: |
23 | 24 |
|
24 | | -| Required fields | Remark | |
25 | | -|-----------------|---------------------------| |
26 | | -| Username | Enter "apikey" | |
27 | | -| Password | Your SendGrid's API key | |
28 | | -| From Address | Your verified sender | |
29 | | -| Host | Enter "smtp.sendgrid.net" | |
30 | | -| Port | Default is 465 | |
| 25 | +### Required Fields |
31 | 26 |
|
32 | | - |
| 27 | +| Field | Description | |
| 28 | +|--------------|--------------------------------------------| |
| 29 | +| Secret Key | Your SendGrid API key | |
| 30 | +| From Address | Your verified email address (or domain) | |
33 | 31 |
|
34 | | -Click on the `Test SMTP Connection` button. If you see `provider: SMTP connected successfully`, it means that your Casdoor service can access the SendGrid service. |
| 32 | +### Default Fields |
35 | 33 |
|
36 | | -Next, click on the `Send Testing Email` button. If you see `Email sent successfully`, it means that the test email has been sent successfully from the `From` address to the `Test Email`. |
| 34 | +| Field | Description | |
| 35 | +|---------|--------------------------------------| |
| 36 | +| Endpoint | Default: `/v3/mail/send` | |
| 37 | +| Host | Default: `https://api.sendgrid.com` | |
| 38 | + |
| 39 | +### Email Fields |
| 40 | + |
| 41 | +| Field | Description | |
| 42 | +|--------------|-------------------------------------------| |
| 43 | +| From Name | The display name of the email sender | |
| 44 | +| Email Title | The subject of the email | |
| 45 | +| Email Content | Supports HTML templates | |
| 46 | +| Test Email | The recipient's email address for testing | |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +Finally, click on the **Send Testing Email** button and check your `Test Email` address for the test email. |
0 commit comments