Skip to main content
wazobiamail-nuxt is the official Nuxt module. It keeps the API key in private Nitro runtime config, adds a serverWazobiaClient(event) helper for server routes, and auto-imports the Vue composables from wazobiamail-vue.

npm package

wazobiamail-nuxt — version 0.1.0

Source

WazobiaMail/wazobiamail-nuxt

At a glance

Install

The module writes:
  • runtimeConfig.wazobiamail.apiKey — private, server-only.
  • runtimeConfig.wazobiamail.baseUrl and timeout — private, server-only.
  • runtimeConfig.public.wazobiamail.baseUrl — safe to expose.

Send from a Nitro route

serverWazobiaClient(event) is auto-imported inside server/:

Composables in pages and components

The module registers global auto-imports for:
  • useSendMail
  • useMailbox
  • useDomains
  • useSpamCheck
  • useWazobiaMail
For browser-side composables, route mutations through your own Nitro endpoints if you do not want a public key in the client bundle. The module’s own serverWazobiaClient is the recommended path for sending.

Environment variables

WAZOBIAMAIL_API_KEY is also accepted by the underlying SDK.

Error handling

Wrap Nitro handlers with typed errors or return a safe server error: