HerzaJ commited on
Commit
3d6d283
·
verified ·
1 Parent(s): 11b4f0e

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +13 -8
index.js CHANGED
@@ -149,10 +149,15 @@ const RequestLog = mongoose.model('RequestLog', requestLogSchema);
149
  const BanList = mongoose.model('BanList', banListSchema);
150
 
151
  const transporter = nodemailer.createTransport({
152
- service: 'gmail',
 
 
153
  auth: {
154
- user: 'dashxapi@gmail.com',
155
- pass: 'hlje fkqz usbm ycvq'
 
 
 
156
  }
157
  });
158
 
@@ -807,11 +812,11 @@ app.post('/api/auth/register', checkBanned, authRateLimit, async (req, res) => {
807
  `;
808
 
809
  await transporter.sendMail({
810
- from: 'dashxapi@gmail.com',
811
- to: email,
812
- subject: 'DashX - Email Verification',
813
- html: emailTemplate
814
- });
815
 
816
  res.json({
817
  success: true,
 
149
  const BanList = mongoose.model('BanList', banListSchema);
150
 
151
  const transporter = nodemailer.createTransport({
152
+ host: 'smtp-relay.brevo.com',
153
+ port: 587,
154
+ secure: false,
155
  auth: {
156
+ user: '998a64001@smtp-brevo.com', // Login dari Brevo (BUKAN email kamu!)
157
+ pass: 'xsmtpsib-c8f574e4088a014fc3859e8dc887afdf65a95bd21e1e3edd7ae32825ac6a44d5-A8ms8qx31RuVgZnc' // SMTP Key
158
+ },
159
+ tls: {
160
+ rejectUnauthorized: false
161
  }
162
  });
163
 
 
812
  `;
813
 
814
  await transporter.sendMail({
815
+ from: '"DashX API" <dashxapi@gmail.com>',
816
+ to: email,
817
+ subject: 'DashX - Email Verification',
818
+ html: emailTemplate
819
+ });
820
 
821
  res.json({
822
  success: true,