Changelog

Lettermint module for Nuxt now available

Published on:

This update is for all Nuxters! 💚

At Lettermint, we're a fan of Nuxt, which is why we built our website with this framework. It's a great milestone for us to add an extra Lettermint integration: our own Nuxt Module for Nuxt 3 and 4.

With the Lettermint Nuxt Module, you can send transactional emails and broadcast emails from your Nuxt website or application. From simple contact forms to a newsletter system, this integration can be used for everything.

The module is ready out of the box for using tags and routes that we recently launched.

How to use

If you use Nuxi (CLI), you can install our module by running npx nuxi module add lettermint in your project. This will install the module and add it to your Nuxt config.

Prefer installing via NPM? Use npm install nuxt-lettermint. Make sure to add nuxt-lettermint to the modules array after installation, for example modules: ['nuxt-lettermint'] in your nuxt config.

An example of how to use the module in your Nuxt project:

server/api/send.post.ts
          import { sendEmail } from '#imports'

export default defineEventHandler(async () => {
    return await sendEmail({
        from: 'hello@example.com',
        to: 'user@example.com',
        subject: 'Welcome',
        html: '<h1>Welcome!</h1>',
        tags: ['welcome']
    })
})

        

The Lettermint Nuxt module can be used in client-side and server-side. For more information and the complete installation guide, you can find our documentation as usual at docs.lettermint.co.