DEV Community

Cover image for Send Hanko auth emails from your domain via Resend
Ashutosh Bhadauriya for Hanko.io

Posted on ā€¢ Edited on ā€¢ Originally published at hanko.io

5 4 3 3 3

Send Hanko auth emails from your domain via Resend

Hanko has made it incredibly simple to add authentication to your application and get started quickly. However, you may have noticed, currently, all emails are sent from mail@hankocloud.com

Email

While this works perfectly initially, as your product grows, you might wanna send emails through your custom domain to enhance brand visibility and have full control over your emails. Hanko makes it super easy for you to do that through your custom SMTP server.

We'll be using the SMTP server provided by Resend for this purpose. Resend is a modern tool that makes it super easy to send and manage transactional emails. Additionally, it will enable you to monitor all your Hanko authentication emails and verify if they were actually sent.

So, let's get started.

Head over to Resend and create an account if you haven't yet. Navigate to Domains section in the right sidebar, click on 'Add domain', and add your domain and region.

Add domain

Now you'll need to create an API key. Go to the API Keys section, click on 'Create API Key', and fill in the required details.

Get api key

Navigate to resend SMTP page, you'll see all the details of your SMTP server here. You'll need to copy-paste these to Hanko.

Get smtp details

Next, go to your Hanko project and navigate to 'Settings' in the sidebar. Click on 'SMTP' there and fill in the details.

Copy the host, port, and username from resend. Next, in the 'Password' section, enter the API key you got from Resend. In the 'Sender email address' section, put the email address you'll be sending emails from, and then hit 'Save'.

Add details to hanko

And there you go! Your emails are now ready to be sent from your custom domain šŸŽ‰

Email from custom domain

Check the Resend docs to know more about it.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (2)

Collapse
 
estherlita profile image
Esther-Lita ā€¢

Great come back post from the team Hanko! šŸš€

Collapse
 
flxmgdnz profile image
Felix Magedanz ā€¢

What I really like about the integration is the ability to monitor all outgoing emails in Resend, e.g. for support cases šŸ‘

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

šŸ‘‹ Kindness is contagious

Please leave a ā¤ļø or a friendly comment on this post if you found it helpful!

Okay