Update index.js
Browse files
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 |
-
|
|
|
|
|
|
|
| 153 |
auth: {
|
| 154 |
-
user: '
|
| 155 |
-
pass: '
|
|
|
|
|
|
|
|
|
|
| 156 |
}
|
| 157 |
});
|
| 158 |
|
|
@@ -807,11 +812,11 @@ app.post('/api/auth/register', checkBanned, authRateLimit, async (req, res) => {
|
|
| 807 |
`;
|
| 808 |
|
| 809 |
await transporter.sendMail({
|
| 810 |
-
|
| 811 |
-
|
| 812 |
-
|
| 813 |
-
|
| 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,
|