more config part 1
This commit is contained in:
parent
b313ffc66a
commit
389ad95efd
2 changed files with 6 additions and 3 deletions
|
@ -5,6 +5,7 @@ import * as fs from 'fs';
|
|||
interface Config {
|
||||
daysInterval: number;
|
||||
timeOfDay: string;
|
||||
emailReceiver: string;
|
||||
}
|
||||
|
||||
// Node structure for the Parse Tree (it's a degenerated tree with one or zero children per node)
|
||||
|
@ -79,7 +80,8 @@ async function sendEmail(content: string) {
|
|||
try {
|
||||
const info = await transporter.sendMail({
|
||||
from: '"The Oracle" <the.oracle@holy.mountain>',
|
||||
to: "Christopher.Hase@telekom.com;test@mailhog.local",
|
||||
//to: "test@mailhog.local", //config
|
||||
to: config.emailReceiver,
|
||||
subject: "Your Horoscope Is Ready",
|
||||
text: content,
|
||||
html: html(content)
|
||||
|
@ -215,7 +217,7 @@ function render(node: Node): string {
|
|||
const regex = new RegExp("~", "g");
|
||||
node.value = node.value?.replace(regex, "");
|
||||
//outputHTML = "<br><p><div style=\"border: 1px dashed gray; border-radius: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; width: auto; display: inline-block; color: gray; text-align: center; box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);\">" + node.value + "</div></p><br>";
|
||||
outputHTML = "<br><br><p><div style=\"padding-left: 20px; padding-right: 20px; padding-top: 20px; padding-bottom: 10px; display: inline-block; color: gray; text-align: center;\">" + node.value + "</div></p><br>";
|
||||
outputHTML = "<br><br><p><div style=\"padding-left: 20px; padding-right: 20px; padding-top: 20px; display: inline-block; color: gray; text-align: center;\">" + node.value + "</div></p><br>";
|
||||
outputHTML = outputHTML + render(node.child!);
|
||||
|
||||
return outputHTML;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"daysInterval": 2,
|
||||
"timeOfDay": "8:00"
|
||||
"timeOfDay": "8:00",
|
||||
"emailReceiver": "test2@mailhog.local"
|
||||
}
|
Loading…
Reference in a new issue