Modificacion del correo se agregaron las variables de entorno con los tokens
This commit is contained in:
@@ -99,8 +99,11 @@ const enviarCorreoInscripcion = async (destinatario, nombreProfesor) => {
|
||||
const transporter = nodemailer.createTransport({
|
||||
service: 'gmail', // o smtp host como 'smtp.mailtrap.io'
|
||||
auth: {
|
||||
user: process.env.CORREO_ORIGEN, // tu correo
|
||||
pass: process.env.CORREO_PASSWORD, // tu contraseña o app password
|
||||
type: 'OAuth2',
|
||||
user: process.env.CORREO_ORIGEN,
|
||||
clientId: process.env.CLIENT_ID,
|
||||
clientSecret: process.env.CLIENT_SECRET,
|
||||
refreshToken: process.env.REFRESH_TOKEN,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -4,8 +4,11 @@ async function enviarCorreoInscripcion(correo, nombre) {
|
||||
const transporter = nodemailer.createTransport({
|
||||
service: 'gmail',
|
||||
auth: {
|
||||
type: 'OAuth2',
|
||||
user: process.env.CORREO_ORIGEN,
|
||||
pass: process.env.CORREO_PASSWORD
|
||||
clientId: process.env.CLIENT_ID,
|
||||
clientSecret: process.env.CLIENT_SECRET,
|
||||
refreshToken: process.env.REFRESH_TOKEN,
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user