Creating A Contact Form With JavaScript / Nodemailer
Why Stack Overflow recommends it
Stack Overflow users cite it when they are following along to build a Node contact form and run into problems with setup, multiple forms, or sending on a live host.
Recommended by 1 people across 1 different months, 2021 to 2022.
What it is
A 37-minute tutorial by Conor Bailey on building an email contact form with JavaScript and Nodemailer. It covers sending mail through a Gmail account as well as a custom email address.
What people said
Recommends C. Programmer · 2022-05 · Stack Overflow · on “Creating multiple contact forms on my site”
@Quentin My apologies for using the wrong terminology. I just don't know how I can have two contact forms in one application. I am using this tutorial but don't know how to use a package.json file for two different contact forms. [this video]
Cites Bexy-Lyn · 2021-09 · Stack Overflow · on “Nodemailer Error: Recipient command failed: 553 5.7.1: Sender address rejected: not owned by user”
I have been searching a lot for an answer, but I did not find my mistake yet. So maybe you can help me with this error I get when trying to send a mail from an unknown mail via nodemailer to my personal mail (for a contact form on my website): api/mail.js import nodemailer from 'nodemailer'; import {valueMissing} from "../../utils/functions"; export default function sendMail (req,res){ if (valueMissing(req.body.name) || valueMissing(req.body.subject) || valueMissing(req.body.message) || valueMissing(req.body.mail)) return res.status(202).json({ success: false }); else { const transporter = nodemailer.createTransport({ port: 465, host: 'smtp.xxx.xxx', auth: { user: process.env.MAIL_USER, pass
Cites D.K · 2021-12 · Stack Overflow · on “Why my contact form is working on localhost but not working when uploaded to web host?”
It is still not working after adding method="post". I took help of this youtube video to make contact form [this video] and in this video he is not using method attribute. Let me know if you need anything else to figure out the problem!! Thanks in advance! @Xuan