<?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 <b>$onlineuser&nbsp;$onlineusernachname</b>. Funkgeräte Funktionsprüfung abgeschlossen am $erstellt";
$text1.= "<br>";
$text1.= "<br>";
$text1.= "<br>";
$text1.= "Mit freundlichen Grüßen";
$text1.= "<br>";
$text1.= "<br>";
$text1.= "Nils Bonk";
$text1.= "<br>";
$text1.= "<br>";
$text1.= "- Leiter Softwareentwicklung -";
$text1.= "<br>";
$text1.= "<br>";
$text1.= "F-Invent.de";
$text1.= "<br>";
$text1.= "Fichtenstraße 52";
$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';
$oMailer->addBCC('noreply@f-invent.de', 'noreply');
$oMailer->addAddress($emailausdb, $onlineuser);

$oMailer->isHTML( true );
$oMailer->Subject = 'Login - 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!';

 ?>
