diff --git a/res/php/sendmail.php b/res/php/sendmail.php index af9782a..33abdce 100755 --- a/res/php/sendmail.php +++ b/res/php/sendmail.php @@ -2,12 +2,22 @@ # COPYRIGHT (c) 2016 Marcel Kapfer (mmk2410) # MIT License +/** + * configuration map + */ $ini = parse_ini_file("../../filespread.ini"); date_default_timezone_set($ini["timezone"]); require '../../vendor/autoload.php'; +/** + * main function that is executed at the beginning. + * + * @author Marcel Kapfer + * + * @param $ini an configuration map. + */ function main($ini) { $data = json_decode($_GET["data"], true); @@ -38,6 +48,16 @@ function main($ini) { } +/** + * function for sending the mail. + * + * @author Marcel Kapfer + * + * @param $title the subject of the mail. + * @param $content the text of the mail. + * @param $address the receiver of the mail. + * @param $ini an configuration map. + */ function sendMail($title, $content, $filename, $address, $ini) { $mail = new PHPMailer;