add from name, change email template

This commit is contained in:
Ayden Jahola 2024-08-31 02:59:28 +01:00
parent 5c9640dc25
commit 21de9bccd3
No known key found for this signature in database
GPG key ID: 71DD90AE4AE92742

8
bot.js
View file

@ -96,13 +96,13 @@ client.on("messageCreate", async (message) => {
const emailHtml = ` const emailHtml = `
<html> <html>
<body style="font-family: Arial, sans-serif; color: #333;"> <body style="font-family: Arial, sans-serif; color: #333;">
<h2 style="color: #1e90ff;">Your Verification Code</h2> <h2 style="color: #1e90ff;">Your Esports Verification Code</h2>
<p>Hi there,</p> <p>Hi there,</p>
<p>Thank you for requesting verification. Your verification code is:</p> <p>Thank you for requesting verification. Your Esports verification code is:</p>
<h3 style="background-color: #f4f4f4; padding: 10px; border: 1px solid #ddd; border-radius: 5px; text-align: center; color: #1e90ff;"> <h3 style="background-color: #f4f4f4; padding: 10px; border: 1px solid #ddd; border-radius: 5px; text-align: center; color: #1e90ff;">
${verificationCode} ${verificationCode}
</h3> </h3>
<p>This code is valid for 10 minutes. Please enter it in the Discord channel using the command <code>!code your_code</code>.</p> <p>This code is valid for 10 minutes. Please enter it in the verification Discord channel using the command <code>!code your_code</code>.</p>
<p>If you did not request this code, please ignore this email.</p> <p>If you did not request this code, please ignore this email.</p>
<p>Best regards,<br>Esports Committee</p> <p>Best regards,<br>Esports Committee</p>
</body> </body>
@ -111,7 +111,7 @@ client.on("messageCreate", async (message) => {
try { try {
await transporter.sendMail({ await transporter.sendMail({
from: process.env.EMAIL_USER, from: `"${process.env.EMAIL_NAME}" <${process.env.EMAIL_USER}>`,
to: email, to: email,
subject: "Esports Verification Code", subject: "Esports Verification Code",
html: emailHtml, // Use HTML content html: emailHtml, // Use HTML content