Перейти до основного вмісту

Send email with SendGrid

This guide explains how to send the emails of Casdoor through the API of SendGrid.


Learning outcomes​

  • Create a SendGrid API key and verify a sender.
  • Add SendGrid as an email provider in Casdoor and test it.

What you need​

  • A SendGrid account
  • Administrator access to the Casdoor admin console

Prepare SendGrid​

  1. In the SendGrid dashboard, go to Settings > API Keys, click Create API Key, and select the permissions that you need. Copy the key.

    API key creation in SendGrid

  2. Verify your sender with Single Sender Verification or Domain Authentication. See Sender Identity.

Add the provider in Casdoor​

  1. In the Casdoor admin console, go to Identity > Providers and add a provider.

  2. Set Category to Email and Type to SendGrid.

  3. Fill in the required fields:

    ПолеОпис
    Secret KeyYour SendGrid API key
    Адреса відправникаVerified sender email or domain
  4. Optionally, change the defaults:

    ПолеЗа замовчуванням
    Кінцева точка/v3/mail/send
    Хостhttps://api.sendgrid.com
  5. Optionally, fill in the remaining fields:

    ПолеОпис
    From NameSender display name
    Email TitleТема
    Email ContentBody (HTML supported)
    Перевірити електронну поштуRecipient for Send Testing Email

    SendGrid provider in Casdoor

  6. Save the provider.

Verify the result​

Click Send Testing Email and check that the message arrives at the Test Email address.

See also​