mensaje de pull a master

erge branch 'master' of https://repositorio.acatlan.unam.mx/CIDWA/servicio_social_api into dev
This commit is contained in:
evenegas
2025-05-05 13:35:41 -06:00
3 changed files with 29 additions and 23 deletions
+20 -17
View File
@@ -1,23 +1,26 @@
require('../config/config');
require('../config/config'); // mantiene tu carga de variables
const nodemailer = require('nodemailer');
const send = require('gmail-send')({
user: process.env.GMAIL,
pass: process.env.GMAILPASSWORD,
const transporter = nodemailer.createTransport({
host: 'smtp-relay.gmail.com',
port: 587,
secure: false,
requireTLS: true,
name: 'acatlan.unam.mx',
pool: true,
maxConnections: 1,
maxMessages: 100,
rateDelta: 2000,
rateLimit: 1,
});
const gmail = (subject, to, text) => {
return new Promise((resolve, reject) => {
send({ subject, to, text }, (error, result, fullResult) => {
if (error) reject(error);
resolve(result);
});
const gmail = (subject, to, text) =>
transporter.sendMail({
from: process.env.USER_GMAIL,
to,
subject,
text,
});
// return "envio de correo"
};
module.exports = gmail;