Skip to content

Sending Emails from an application on Vercel

Sending emails from within your application can be achieved by using Serverless Functions. To do this, you can either rely on the outgoing SMTP connection of your Serverless Function or use the API of an external service.

To send emails from Vercel without restrictions, we recommend the use of third-party mail services:

By using one of the services listed above, you will also benefit from analytics, scheduling, and many other features exclusively available from a specialized service.

You can also use libraries like nodemailer. When doing so, we recommend using an external host value provided by a third-party provider, rather than defaulting to the outbound SMTP connection of the Serverless Function.

When developing your emails locally, we recommend using the Mailing library. Some of its features include:

  • Develop and preview emails with React (with support for Next.js Fast Refresh)
  • Intercept emails in localhost and show a preview of them in the browser to avoid accidental sends (example)
  • One click deploy your email previews to Vercel to share with your team

Couldn't find the guide you need?