send report
This commit is contained in:
32
_include/include_send_report.php
Normal file
32
_include/include_send_report.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
|
||||
$mail = new PHPMailer(true); // Passing `true` enables exceptions
|
||||
try {
|
||||
//Server settings
|
||||
$mail->SMTPDebug = 0; // Enable verbose debug output
|
||||
$mail->isSMTP(); // Set mailer to use SMTP
|
||||
$mail->CharSet = PHPMailer::CHARSET_UTF8; // UTF-8
|
||||
$mail->Host = 'mail.livingsport.hu '; // Specify main and backup SMTP servers
|
||||
$mail->SMTPAuth = true; // Enable SMTP authentication
|
||||
$mail->Username = 'notify@livingsport.hu'; // SMTP username
|
||||
$mail->Password = 'dpDiKSqU0V'; // SMTP password
|
||||
$mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
|
||||
$mail->Port = 465; // TCP port to connect to
|
||||
|
||||
//Recipients
|
||||
$mail->setFrom("notify@livingsport.hu");
|
||||
$mail->addAddress("tricsusz@gmail.com", "Tóth Richárd");
|
||||
//$mail->addAddress('tricsusz@gmail.com', 'Tóth Richárd'); // TEST
|
||||
|
||||
|
||||
//Content
|
||||
$mail->isHTML(true); // Set email format to HTML
|
||||
$mail->Subject = "Havi egyenleg lista";
|
||||
$mail->Body = "Az előző havi egyenleglista elérhető az alábbi linkről: http://badminton.livingsport.hu/admin/download_report/".date("Y-m", strtotime("-1 month"));
|
||||
|
||||
//send mail
|
||||
$mail->send();
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user