{$imageFile} | {$sourceFile[1]} | {$sourceFile[2]} | {$imageDate} | " . implode(" ", $desc[1]) . " |
";
$this->mailController->sendMail($mailAddress, $desc[0], $this->getMailBody($descriptions), "", array($attachments));
}
}
} else {
$attachments = array();
$descriptions = array();
foreach ($image as $filename => $desc) {
$sourceFile = "";
preg_match("/(.*)_(\d+)\.\w{3}/", basename($filename), $sourceFile);
$imageFile = $desc[0] . substr($filename, -4);
$imageDate = "Heute nicht verfügbar.";
if (file_exists($filename) && abs(filemtime($filename) - strtotime("now")) < 24 * 60 * 60) {
$attachments[] = array(realpath($filename), $imageFile);
$imageDate = date("d.m.Y H:i", filemtime($filename));
}
$descriptions[] = "