<?php


use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

include_once __DIR__ . '/PHPMailer/PHProcksAutoloader.php';

$oMailer = new PHPMailer;
$oMailer->CharSet = 'UTF-8';

$erstellt = date("d.m.Y - H:i:s");
$text1 = "<img width='200' height='50' src='http://badzwischenahn.f-invent.de/img/F-invent-1.png'><br><br><br>Hallo $uservorname&nbsp;$usernachname.";
$text1.= "<br>";
$text1.= "<br>";
$text1.= "Deine PSA ist aus der Reinigung zurück.";
$text1.= "<br>";
$text1.= "<br>";
$text1.= "Mit freundlichen Grüßen";
$text1.= "<br>";
$text1.= "<br>";
$text1.= "Tim Weichert";
$text1.= "<br>";
$text1.= "<br>";
$text1.= "- Gerätewart PSA -";
$text1.= "<br>";
$text1.= "<br>";
$text1.= "Feuerwehr Bad Zwischenahn";
$text1.= "<br>";
$text1.= "Vor dem Esch 11";
$text1.= "<br>";
$text1.= "26160 Bad Zwischenahn";


$oMailer->isSMTP();
$oMailer->Host = 'mail.f-invent.de';
$oMailer->SMTPAuth = true;
$oMailer->Username = 'noreply@f-invent.de';
$oMailer->Password = 'b*Y!@Ys.aKS^';
$oMailer->SMTPSecure = 'tls';
$oMailer->Port = 587;


$oMailer->From = 'noreply@f-invent.de';
$oMailer->FromName = 'F-Invent.de';
//empfänger daten
$oMailer->addAddress( $email, $onlineuser );
//$oMailer->addBCC('noreply@f-invent.de', 'noreply');

$oMailer->isHTML( true );
$oMailer->Subject = 'Deine PSA - F-Invent.de';
$oMailer->Body = $text1;

$oMailer->AltBody = strip_tags( $oMailer->Body );


if ( !$oMailer->send() ) {

    echo 'Something\'s went wrong!';
    exit;

}

//echo 'Yes! First Mail with PHPMailer sent successfully!';

 ?>
