Skip to main content
Version: 2.0.0

Email Configuration and Templates

Notify and Control your end users with fully customizable emails.

What are Email configuration and templates?

Permit.io Email Configuration and Templates allow you to seamlessly integrate Elements features into a selected Email provider. This enables you to automatically send notifications and action controls to end users using your preferred email provider. You can invite, approve, and engage with users efficiently, creating a streamlined workflow using smart and fully customizable emails.

Email Providers Supported

Permit Elements currently supports the following email providers (with more coming soon):

  • SMTP Provider

Coming soon:

  • SendGrid
  • Mailgun
  • Amazon SES
  • Mandrill
  • SparkPost
Don't see your provider here?

The email configuration is continually being developed. If you have any providers that you would like to see, please reach out to us on Slack, and we will see what we can do.


Setting up Email Configuration

1. Turn on email notifications

The first step will be to turn on email notifications in the desired Element config. This will allow you to configure your email provider and templates. For example here, we are turning on email notifications for the User Management Element.

Turn on email notifications

2. Select your email provider

Next, you will need to select your email provider.

In the Element Settings Screen you will see a menu with the available email providers:

Select your email provider

Select the provider you would like to use and fill in the required fields:

Select your email provider

Now you'll be able to send a test email to make sure everything is working correctly ✅:

Select your email provider

3. Customize your email templates

Now that you have your email provider set up, you can customize your email templates. For example, when setting up the User Management Element template, the end user that being invited will get a customized email.

After filling in the required fields, you can customize the email message using HTML and CSS.

Note

Pay attention to keep the {{ redirect_to }} variable in your email message. This variable will be replaced with the URL that you filled in the "Redirect To" field in the template itself.

Customize your email templates

That's it ! 👏 You can now send automatic and customized emails to your end users using your preferred email provider.

Supporting users invitation and approval User Management Element

After setting up your email provider and templates, you can now use the User Management Element to invite and approve new end users.

1. Invite a new end user using the User Management Element

Inviting a new user is as simple as adding the user email, selecting a role, and clicking the "Invite" button: Inviting Approving the invited user using an SDK

Invite a new end user using the User Management Element

2. Approving the invited user using an SDK

After the user has been invited, they will receive an email with a URL link to approve their account. In the URL link, there will be query parameter called invite_code that will be used to approve the user. For example, the URL link will look like this: https://test.com/?invite_code=ed32bc43e2194a80a5ef5e0339943b44

Using the invite code, you can approve that the user is a valid user using a valid email address. You can do this using the SDK of your choice, for example, using the Python SDK:

await permit.api.users.approve(
user_key="new_user",
email="new-user@example.com",
invite_code="ed32bc43e2194a80a5ef5e0339943b44"
)

Now, the new approved user will be created and synced with the chosen role.

Templates Variables (Coming Soon)

In the upcoming weeks we will be adding more template variables to allow you to customize your emails even further. For example:

  • Setting your Email "Subject" to include the user full name
  • Custom query parameters to your "Redirect To" URL
  • Make much more powerful Email message content using variables

Sign up for updates
Sign up to be notified of new featuresProvide your email to receive early access to eligible beta features for Permit Elements.
Read our privacy policy.
Was this page helpful?
Questions? Contact Us.Watch our developer tutorials.Need help? Join our Slack.
Sign up for developer updates:
You can unsubscribe at any time. Read our privacy policy.