Skip to content

Send emails from your Nuxtjs App using Nodemailer

Notifications You must be signed in to change notification settings

funwiche/nuxt-mailer

Repository files navigation

Nuxt Mailer

Send emails from your Nuxtjs App using Nodemailer. Rich user interface to send emails and attachments.

Setup

Make sure to install the dependencies:

# yarn
yarn install

# npm
npm install

Create a .env file and add the following variables:

EMAIL_ADDRESS= #Smtp Email address.
EMAIL_SECRET= #Smtp Password
### Use email from your website

Development Server

Start the development server on http://localhost:3000

# yarn
yarn dev

# npm
npm run dev

Send email

Using form

Add enctype='multipart/form-data' to your form

Using Ajax

Convert body info new FormData() and use the code below:

fetch("/api/meta", {
  method: "POST",
  body: formData,
})
  .then((res) => res.json())
  .then((json) => console.log(json));

Note: And email wil be sent to the email address provided in the body of this request.

About

Send emails from your Nuxtjs App using Nodemailer

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published