This commit is contained in:
parent
3855d5befc
commit
db846c890e
2 changed files with 3 additions and 8 deletions
|
@ -48,14 +48,10 @@ 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
|
||||
|
@ -80,7 +76,6 @@ async function sendEmail(content: string) {
|
|||
try {
|
||||
const info = await transporter.sendMail({
|
||||
from: '"The Oracle" <the.oracle@holy.mountain>',
|
||||
//to: "test@mailhog.local", //config
|
||||
to: config.emailReceiver,
|
||||
subject: "Your Horoscope Is Ready",
|
||||
text: content,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"daysInterval": 2,
|
||||
"timeOfDay": "8:00",
|
||||
"emailReceiver": "test2@mailhog.local"
|
||||
"emailReceiver": "test@mailhog.local"
|
||||
}
|
Loading…
Reference in a new issue