nuxt-email-layer
v0.0.10
Published
Nuxt layer for building and sending emails with Vue Email.
Readme
nuxt-email-layer
Nuxt layer for building and sending emails with Vue Email.
Documentation
Providers:
- MailCatcher (Development)
- Mailgun (Production)
Simple Example
// nuxt.config.ts (with config)
export default defineNuxtConfig({
extends: ["nuxt-email-layer"],
runtimeConfig: {
email: {
provider: "mailcatcher",
defaultFrom: "[email protected]",
mailgun: {
apiKey: "", // NUXT_EMAIL_MAILGUN_API_KEY
domain: "", // NUXT_EMAIL_MAILGUN_DOMAIN
},
},
},
});export default defineEventHandler(async (event) => {
const email = useEmail();
const result = await email.send({
to: "[email protected]",
subject: "Hello",
body: "<html><body><h1>Test email from Nuxt Email Layer.</h1></body></html>",
text: "Test email from Nuxt Email Layer.",
});
});See the docs for more information.
