From 18da65cb74262623719f291920f03ad6ae4a277c Mon Sep 17 00:00:00 2001 From: root Date: Tue, 27 Oct 2015 10:58:11 +0100 Subject: Login via E-Mail works now. --- mail.php | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'mail.php') diff --git a/mail.php b/mail.php index ad0eb81..e8294bd 100644 --- a/mail.php +++ b/mail.php @@ -9,13 +9,14 @@ function getInstance() { //// 0 = off (for production use) //// 1 = client messages //// 2 = client and server messages - $mail->SMTPDebug = 2; + $mail->SMTPDebug = 0; ////Ask for HTML-friendly debug output $mail->Debugoutput = 'html'; ////Set the hostname of the mail server $mail->Host = "mx.iamfabulous.de"; + $mail->SMTPSecure = 'tls'; ////Set the SMTP port number - likely to be 25, 465 or 587 - $mail->Port = 587; + $mail->Port = 25; ////Whether to use SMTP authentication $mail->SMTPAuth = false; ////Set who the message is to be sent from @@ -30,7 +31,21 @@ function sendMailWithHash($email, $name, $hash) { $mail = getInstance(); $mail->addAddress($email); $mail->Subject = 'JG Login'; - $mail->msgHTML(file_get_contents('static/mail_template.php')); - return $mail->sent(); + ob_start(); + include('static/mail_template.php'); + $content = ob_get_clean(); + + $mail->msgHTML( $content ); +/* +'Hallo ' . htmlentities($name) . ',
+
+um dich auf der Website der JG einzuloggen bitte folge diesen Link. +
+Viele Gr' . htmlentities(üß) . 'e,
+
+JG Adlershof '); + */ + + return $mail->send(); } -- cgit v1.2.3