Skip to Content
Edit on GitHub

Email Configuration

LearnHouse supports two email providers for transactional email delivery: Resend and SMTP. Email is used for user invitations, password resets, and system notifications.

Choosing a Provider

Set the email provider in your .env file using the LEARNHOUSE_EMAIL_PROVIDER variable:

LEARNHOUSE_EMAIL_PROVIDER=resend   # or "smtp"

Option 1: Resend

Resend  is a developer-friendly email API service.

LEARNHOUSE_EMAIL_PROVIDER=resend
LEARNHOUSE_RESEND_API_KEY=re_your-resend-api-key
LEARNHOUSE_SYSTEM_EMAIL_ADDRESS=noreply@example.com

Getting a Resend API Key

  1. Create an account at resend.com 
  2. Add and verify your sending domain
  3. Generate an API key from the Resend dashboard
  4. Copy the API key into your .env file

Option 2: SMTP

You can use any SMTP server, including services like Amazon SES, Mailgun, or your own mail server.

LEARNHOUSE_EMAIL_PROVIDER=smtp
LEARNHOUSE_SMTP_HOST=smtp.example.com
LEARNHOUSE_SMTP_PORT=587
LEARNHOUSE_SMTP_USERNAME=user@example.com
LEARNHOUSE_SMTP_PASSWORD=your-smtp-password
LEARNHOUSE_SMTP_USE_TLS=true
LEARNHOUSE_SYSTEM_EMAIL_ADDRESS=noreply@example.com

SMTP Variables

VariableDescriptionDefault
LEARNHOUSE_SMTP_HOSTSMTP server hostname
LEARNHOUSE_SMTP_PORTSMTP server port587
LEARNHOUSE_SMTP_USERNAMESMTP authentication username
LEARNHOUSE_SMTP_PASSWORDSMTP authentication password
LEARNHOUSE_SMTP_USE_TLSEnable TLS encryptiontrue

Applying Changes

After updating your email configuration, restart your instance:

learnhouse stop
learnhouse start

System Email Address

The LEARNHOUSE_SYSTEM_EMAIL_ADDRESS is the “from” address used for all outgoing emails. When using Resend, this address must belong to a domain that is verified in your Resend account. When using SMTP, ensure the address is permitted by your SMTP server.

If email is not configured, features like user invitations and password resets will not work. Users can still be created manually by an administrator.

What Emails Are Sent

LearnHouse sends the following types of email:

  • User invitations — when an admin invites a user to join the platform or an organization
  • Password resets — when a user requests a password reset
  • System notifications — important system-level notifications