22 lines
528 B
PHP
22 lines
528 B
PHP
<?php
|
|
|
|
include_once __DIR__ . '/../controller/DatabaseController.php';
|
|
include_once __DIR__ . '/../controller/DataController.php';
|
|
|
|
function sendMail($subject, $message, $url) {
|
|
$headers = "From: bruno.eckhardt07@gmail.com\r\n";
|
|
mail(
|
|
"bruno.eckhardt07@gmail.com",
|
|
$subject,
|
|
$message,
|
|
$headers
|
|
);
|
|
DatabaseInsert(
|
|
"Mailing",
|
|
"Datum, SUBJECT, MESSAGE, URL",
|
|
(new getSpecificData())->getRequestTime(),
|
|
$subject,
|
|
$message,
|
|
$url
|
|
);
|
|
} |