adding birdweather request email template for now

This commit is contained in:
mcguirepr89
2022-02-01 13:04:27 -05:00
parent 8fdcfc1fc6
commit 6282b84dda
3 changed files with 27 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
$config = parse_ini_file('/home/pi/BirdNET-Pi/thisrun.txt');
} elseif (file_exists('/home/pi/BirdNET-Pi/firstrun.ini')) {
$config = parse_ini_file('/home/pi/BirdNET-Pi/firstrun.ini');
}
$template = file_get_contents("email_template.html");
foreach($config as $key => $value)
{
$template = str_replace('{{ '.$key.' }}', $value, $template);
}
echo $template;
?>