https://github.com/funwiche/nuxt-mailer
Send emails from your Nuxtjs App using Nodemailer
https://github.com/funwiche/nuxt-mailer
h3 nitro nodemailer nuxt3 nuxtjs vuetify vuetify3
Last synced: about 1 year ago
JSON representation
Send emails from your Nuxtjs App using Nodemailer
- Host: GitHub
- URL: https://github.com/funwiche/nuxt-mailer
- Owner: funwiche
- Created: 2023-03-15T10:27:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-15T11:02:52.000Z (over 3 years ago)
- Last Synced: 2024-11-19T03:42:20.139Z (over 1 year ago)
- Topics: h3, nitro, nodemailer, nuxt3, nuxtjs, vuetify, vuetify3
- Language: Vue
- Homepage:
- Size: 118 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```bash
# yarn
yarn install
# npm
npm install
```
Create a `.env` file and add the following variables:
```bash
EMAIL_ADDRESS= #Smtp Email address.
EMAIL_SECRET= #Smtp Password
### Use email from your website
```
## Development Server
Start the development server on http://localhost:3000
```bash
# 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:
```javascript
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.