A Node.js script developed during the Santander Coders bootcamp. It simulates a weekly marketing email dispatch for a fictional car dealership, sending promotional messages only to customers who opted in to marketing and only on Mondays.
- JavaScript (ES Modules)
- Node.js (no external dependencies)
node index.jsThe script checks whether today is Monday. If it is, it iterates over the customer list in data.js and logs a formatted email to the console for each customer with aceitaMarketing: true. On any other day it exits with an informational message.
index.js # Entry point — orchestrates the email send flow
envia-email.js # enviarEmail() — validates inputs and logs the formatted email
data.js # Hard-coded customer list with email and marketing consent flag
utils.js # verificarDiaDaSemana() and montarCorpoEmail() helpers
package.json # package metadata (type: "module")