diff --git a/broker.ts b/broker.ts index 7e01e06..ead3e38 100644 --- a/broker.ts +++ b/broker.ts @@ -48,17 +48,13 @@ function executeCommand(): void { } console.log(`Send E-Mail`); - sendEmail(stdout); - console.log(config.daysInterval, config.timeOfDay); - // Calculate next execution time const nextRunDate = calculateNextRunDate(config.daysInterval, config.timeOfDay); - //console.log(`Gegenwärtig: ` + new Date()); console.log(`Next execution: ${nextRunDate}`); - //Start Scheduling + // Start Scheduling scheduleNextRun(nextRunDate); }); } @@ -80,7 +76,6 @@ async function sendEmail(content: string) { try { const info = await transporter.sendMail({ from: '"The Oracle" ', - //to: "test@mailhog.local", //config to: config.emailReceiver, subject: "Your Horoscope Is Ready", text: content, diff --git a/config.json b/config.json index 4ad956a..3523d07 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { "daysInterval": 2, "timeOfDay": "8:00", - "emailReceiver": "test2@mailhog.local" - } \ No newline at end of file + "emailReceiver": "test@mailhog.local" +} \ No newline at end of file