Email configuration

By default, UI Bakery On-Premise comes with a noop email provider that will only log emails to the backend logs.

SMTP sender

SMTP is the suggested method for sending emails. To enable it, set the following environment variables:

UI_BAKERY_MAILING_PROVIDER=smtp

UI_BAKERY_SMTP_HOST=smtp.mymailhost.com
UI_BAKERY_SMTP_PORT=2525
UI_BAKERY_SMTP_USERNAME=YOUR_SMTP_USERNAME
UI_BAKERY_SMTP_PASSWORD=YOUR_SMTP_PASSWORD
UI_BAKERY_SMTP_ENCRYPTION=tls OR ssl

Restart your containers to apply the settings.

SendGrid sender

SendGrid is another built-in option to send UI Bakery emails.

  1. Create a SendGrid account or use an existing account.

  2. Generate an API Key with the Mail Send access enabled.

  3. Set the following environment variables:

    UI_BAKERY_MAILING_PROVIDER=sendgrid
    
    SENDGRID_API_KEY=YOUR_API_KEY
  4. Restart the containers.

Once configured, your instance will start using your account to send the user invitation, password reset, and other emails.

Configure email sender

By default, all emails are sent from the UI Bakery <[email protected]> email address. Use the following variables to customize the email sender:

Change email templates

By default, email templates and subjects are provided as environment variables, so you can adjust the emails by modifying their content:

You can use the following built-in email variables to add user values to your emails:

If you are using SendGrid as an email sender, you can set up email templates using SendGrid dynamic templates and put template IDs instead of plain HTML emails:

Ensure you provide template IDs for all available emails. Emails without a provided ID will fail to be sent.

This way, you don't need to manage template content inside your environment variables and can build more advanced emails with images and custom styles.

Last updated

Was this helpful?