Answer the question
In order to leave comments, you need to log in
Email validators for discord.js bot?
I am writing a bot for auto sending letters from discord to any mail. But the problem is its validation. Tried through the module , but this validator does not give any results and has only a function: . And after that, nowhere is it explained how to display the result. The code for sending the email:const validator = require("email-validator")
validator.validate(`${usermail}`)
const data = require('./secure.json');
const nodemailer = require('nodemailer');
const botmail = data.mail;
const botpass = data.pass;
let usermail = args[0];
let textmail = args.slice(1).join(' ') || 'error~';
let transporter = nodemailer.createTransport({
service: 'gmail',
secure: true,
auth: {
user: `${botmail}`,
pass: `${botpass}`
}
});
transporter.sendMail({
from: `"Discord Message Relay" ${botmail}`,
to: `${usermail}, ${usermail}`,
text: `${textmail}`
});
Answer the question
In order to leave comments, you need to log in
И после этого нигде не объясняется каким образом вывести результат
`${usermail}`
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question