Skip to main content
wazobiamail-vue wraps the core wazobiamail SDK in Vue 3 composables and an application plugin. Use it when you want reactive state for sending, inboxes, domains or spam checks without writing loading/error plumbing.

npm package

wazobiamail-vue — version 0.1.0

Source

WazobiaMail/wazobiamail-vue

At a glance

Install

Register the plugin

The plugin provides the client through useWazobiaMail() and $wazobiamail on component instances. Keep VITE_WAZOBIA_API_KEY server-only in production; for browser apps, proxy sends through your own backend.

Send email with useSendMail

Other composables

  • useMailbox(mailboxId) — reactive headless inbox with pagination, unread filter, polling and optimistic delete.
  • useDomains() — list/create domains, read DNS records and verify.
  • useSpamCheck() — run a pre-flight deliverability/spam check.
  • useWazobiaMail() — access the underlying client for anything not wrapped by a composable.

Error handling

Composables expose error refs and re-throw from async actions. Catch the core typed errors when you need status codes or retry behavior:

Framework notes

Vue’s reactivity is handled with ref and computed; polling timers are cleaned up on unmount when the composable is used inside a component. For SSR/Nuxt, prefer the dedicated wazobiamail-nuxt module so API keys stay on the Nitro server.