aboutsummaryrefslogtreecommitdiff
path: root/mail.php
diff options
context:
space:
mode:
Diffstat (limited to 'mail.php')
-rw-r--r--mail.php23
1 files changed, 19 insertions, 4 deletions
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) . ', <br>
+<br>
+um dich auf der Website der JG einzuloggen bitte folge <a href="https://jungegemeinde.iamfabulous.de/?page=action&task=verify&email=' . htmlentities($email) . '&hash=' . $hash . '&goto='.htmlentities($_GET['goto']) . '" title="Einloggen">diesen Link</a>.
+<br>
+Viele Gr' . htmlentities(üß) . 'e, <br>
+<br>
+JG Adlershof ');
+ */
+
+ return $mail->send();
}