Skip to content

Resend

Mkdirs uses Resend as the email service, supports sending emails, receiving notification emails, and supports subscription functionality.

Configuration

  1. Create an account on Resend

    If don’t have an account on Resend, follow their steps to signup.

    After signin on Resend, following their steps to add your domain to Resend.

  2. Get the Resend API key

    Click on API Keys on the left navigation bar, then click on the Create API key button, and set it to the .env file.

    .env
    # [only required if you want to authenticate users by email/password]
    RESEND_API_KEY=your_api_key

    Resend Keys

  3. Set the email address to send the emails from

    When sending an email, for example, signup emails, the email will be sent from the following email address:

    .env
    # [only required if you want to authenticate users by email/password]
    RESEND_EMAIL_FROM=[email protected]
  4. [Optional] Set the email address to receive the notification emails

    When there is a new submission from a customer, a notification email will be sent to the following email address:

    .env
    # [only required if you want to receive notification emails]
    RESEND_EMAIL_ADMIN=[email protected]
  5. [Optional] Get the audience id for newsletter

    Create a new audience in Resend and copy the audience id, then set it to the .env file.

    This variable is used to support newsletter subscription on the website, if you don’t need it, you can skip this step.

    .env
    # [only required if you want to support newsletter]
    RESEND_AUDIENCE_ID=your_audience_id

    Resend Audience

Video tutorial

Further Reading