Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a42d9a29c3 | |||
| 03b4225378 |
@@ -18,14 +18,31 @@ export class MailService {
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.transporter = nodemailer.createTransport({
|
/* {
|
||||||
service: 'gmail',
|
service: 'gmail',
|
||||||
auth: {
|
auth: {
|
||||||
user: process.env.USER_GMAIL,
|
user: process.env.USER_GMAIL,
|
||||||
pass: process.env.PASS_GMAIL,
|
pass: process.env.PASS_GMAIL,
|
||||||
},
|
},
|
||||||
});
|
} */
|
||||||
|
|
||||||
|
|
||||||
|
this.transporter = nodemailer.createTransport(
|
||||||
|
{
|
||||||
|
host: 'smtp.gmail.com', // o smtp‑relay.gmail.com (ver punto 2)
|
||||||
|
port: 587,
|
||||||
|
secure: false,
|
||||||
|
requireTLS: true, // TLS STARTTLS
|
||||||
|
auth: { user: process.env.USER_GMAIL, pass: process.env.PASS_GMAIL },
|
||||||
|
pool: true, // <‑‑ activa reuse
|
||||||
|
maxConnections: 1, // una sola conexión viva
|
||||||
|
maxMessages: 100, // reabrir después de 100 envíos
|
||||||
|
rateDelta: 2000, // ventana 1 s
|
||||||
|
rateLimit: 1 // máx. 5 mensajes/seg
|
||||||
|
}
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user