{"repo":"dword-design/nuxt-mail","free":true,"listed":false,"github":"https://github.com/dword-design/nuxt-mail","clone":"git clone https://github.com/dword-design/nuxt-mail.git","description":"Adds email sending capability to a Nuxt.js app. Adds a server route, an injected variable, and uses nodemailer to send emails.","language":"TypeScript","stars":328,"topics":["nodemailer","nuxt","nuxtjs","nuxtjs-module","nuxt-module","inject","server","express","mail","email"],"license":null,"category":"auth-billing-email","readme_excerpt":"nuxt-mail Adds email sending capability to a Nuxt.js app. Adds a server route, an injected variable, and uses nodemailer to send emails. Does not work for static sites (via nuxt generate ) because the module creates a server route. ℹ️ Info: This module has been built in Nuxt 2 time where it was extra effort to build server routes. With Nuxt 3 it got much easier to do so, so this module is basically for simple contact forms. If you want to build more complex stuff, I recommend to use nodemailer directly or nuxt-nodemailer instead. Install Configuration Add the module to the modules array in your Nuxt config: You can also set environment variables like NUXT MAIL , NUXT MAIL SMTP , NUXT MAIL MESSAGE , etc. as JSON. They will be deserialized and put into the runtime config automatically. The smtp options are required and directly passed to nodemailer. Refer to their documentation for available options. Also, you have to pass at least to , cc or bcc via the message config. This has security reasons, this way the client cannot send emails from your SMTP server to arbitrary recipients. You can actually preconfigure the message via the message config, so if you always want to send emails with the same subject or from address, you can configure them here. Now we can send emails: Via composable Via Options API Multiple message configs It is also possible to provide multiple message configurations by changing the message config into an array. Then you can reference the config like this:","default_branch":null,"files":null,"tree":[],"storefront":"/r/dword-design","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dword-design/nuxt-mail/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}