Skip to content

Commit

Permalink
fix (server): now sheduler send emails to apprentices
Browse files Browse the repository at this point in the history
  • Loading branch information
StivenKN committed Nov 6, 2023
1 parent 8a3bdbc commit 90c428c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/utils/scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const sendEmailsToStudents = async (payload: IStudentData[]): Promise<void> => {
const item = payload[i]
const body = `<html><head><style>body{font-family:Arial, sans-sefif;}.container{background-color: #A6E29B;border-radius: 15px;max-width:500px;margin:0 auto;padding: 20px;display:grid;grid-template-columns:1fr;gap:10px;color:black;}.title{text-align:center;margin:0;}.name-student{font-weight:bold;text-transform:uppercase;}.divider{width:50%;border-color: black;}.info-content{font-size:15px;text-align:center;margin:0;}.link{font-weight:bold;}.span{text-align:center;font-size:12.5px;font-weight:bold;}.image{width:50px; height:48px;margin-right:10px;}.info-footer{width: fit-content;display: grid;grid-template-columns: 1fr;margin: 0;padding: 0;text-align: center;justify-items: center;}.title-footer{margin:0px;}.footer{display:flex;gap:10px;width:fit-content;margin:auto;align-items:center;}</style></head><body><section class="container"><h3 class="title">Cordial saludo, aprendiz <span class="name-student">${item.nombre_aprendiz} ${item.apellido_aprendiz}.</span></h3><hr class='divider'></hr><p class="info-content">Usted se encuentra reportado sin prácticas actualmente, por favor contáctese con <a class="link" href="mailto:practicasctm@sena.edu.co">practicasctm@sena.edu.co</a> para buscar una alternativa de prácticas o actualizar su estado.</p><p class="span">***Correo generado automáticamente - No responder***</p><section class="footer"><img src="https://certificadossena.net/wp-content/uploads/2022/10/logo-sena-negro-png-2022-300x294.png" alt="logo" class="image"><div class="info-footer"><h3 class="title-footer">Servicio Nacional de Aprendizaje</h3><span>Centro Tecnológico del Mobiliario</span></div></section></section></body></html>`

await sendEmailAnyBodyNotfile({ body, subject: 'Información: aprendiz notificado sin prácticas', to: 'loremail527@gmail.com' })
await sendEmailAnyBodyNotfile({ body, subject: 'Información: aprendiz notificado sin prácticas', to: item.email_aprendiz })

await new Promise((resolve) => setTimeout(resolve, 1000))
}
Expand Down

0 comments on commit 90c428c

Please sign in to comment.