This guide will walk you through the process of sending your own emails instead of relying on Hanko’s default email delivery.

Create a Webhook

Create a webhook with the event email.send. This webhook will be triggered whenever an email needs to be sent.

If you have not created a webhook yet, please refer to the Webhooks guide.

Disable Email delivery by Hanko

This feature is only available in the Pro or Enterprise plan.

1

Access your project's email delivery settings

Log in to Hanko Cloud, select your organization and project and navigate to Settings > Email delivery.

2

Disable Email delivery

Find the Email delivery by Hanko setting and click the toggle to disable it.

Once disabled, Hanko will no longer send any emails on your behalf.

Send your own emails

When an email needs to be sent, the email.send webhook event will be triggered, providing you with all the necessary data to send your own email. The webhook token payload will include the following information:

The data property in the token payload provides type-specific data that can be used to personalize the email further. The structure of the data property varies depending on the type of the email being sent.

Using the provided webhook data, you can compose and send the email to the user using your preferred email service provider or custom email infrastructure.