isSMTP(); $mail->SMTPAuth = true; $mail->Host = $config['mail_server']; $mail->Port = $config['mail_port']; $mail->Username = $config['mail_user']; $mail->Password = $config['mail_password']; $mail->From = $config['mail_address']; $mail->FromName = 'Mailer'; try { $mail->addAddress('test@joethei.de', 'Joe User'); } catch (\PHPMailer\PHPMailer\Exception $e) { } $mail->Subject = 'Here is the subject'; $mail->AltBody = 'Message without html'; $mail->Body = 'This is the HTML message body in bold!'; try { !$mail->send(); } catch (\PHPMailer\PHPMailer\Exception $e) { echo $e; }