Back
December 21, 2025

Use Supabase Mailpit to send emails locally

A quick guide on how to use Supabase with Mailpit to test and preview emails locally during development

For a local environment, you might want to send emails to your local inbucket that supabase provides.

const transporter = nodemailer.createTransport({
  host: 'inbucket',
  port: 1025,
  secure: false,
  auth: null
})

await transporter.sendMail({
  from: FROM_EMAIL,
  to: data.to,
  subject: data.subject,
  text: data.text
})

If you are using previous versions of supabase, change port from 1025 to 2500.

Let's work together.

Building beautiful and performant products

Contact Me

Follow

© 2026 Carlos Marques | Software Engineer & Designer