Browse Source

🎈 perf: 优化邮件发送方式

Pchen. 7 months ago
parent
commit
4e09f69fd2
1 changed files with 1 additions and 2 deletions
  1. 1 2
      plugin/Email/Email.js

+ 1 - 2
plugin/Email/Email.js

@@ -8,7 +8,6 @@ const logger = new Logger(path.join(__dirname, '../../logs/Email.log'), 'INFO');
 const transporter = nodemailer.createTransport({
     host: config.email.host,
     port: config.email.port,
-    secure: config.email.secure,
     auth: {
         user: config.email.user,
         pass: config.email.password
@@ -18,7 +17,7 @@ const transporter = nodemailer.createTransport({
 async function sendEmail(email, subject, content) {
     return new Promise((resolve, reject) => {
         const mail = {
-            from: `RunForge <${transporter.options.auth.user}>`,
+            from: config.email.from,
             to: email,
             subject: subject,
             html: content