summaryrefslogtreecommitdiff
path: root/includes/email.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/email.php')
-rw-r--r--includes/email.php52
1 files changed, 0 insertions, 52 deletions
diff --git a/includes/email.php b/includes/email.php
index 7357812..71ba4e1 100644
--- a/includes/email.php
+++ b/includes/email.php
@@ -141,58 +141,6 @@ function sendRegistrationRejection($email, $name, $id, $reason) {
$mail->send();
}
-function sendPlanUpdate($email, $plan) {
- global $emailConfig;
-
- $price = (float)trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/plusprice"));
-
- switch ($plan) {
- case 0:
- default:
- $monthFee = 0;
- $name = "Delta Free";
- break;
-
- case 1:
- $monthFee = $price;
- $name = "Delta Plus";
- break;
-
- case 2:
- $monthFee = $price + 2;
- $name = "Delta Ultra";
- break;
- }
-
- $mail = new PHPMailer(true);
- $mail->isSMTP();
- $mail->Host = 'in-v3.mailjet.com';
- $mail->SMTPAuth = true;
- $mail->Username = $emailConfig["username"];
- $mail->Password = $emailConfig["password"];
- $mail->SMTPSecure = "none";
- $mail->Port = 587;
-
- $mail->setFrom('delta@equestria.dev', 'Delta');
- $mail->addAddress($email);
- $mail->addReplyTo(trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/email")), 'Equestria.dev');
-
- $mail->isHTML();
- $mail->Subject = l("lang_email_plan_title");
- $mail->addEmbeddedImage($_SERVER['DOCUMENT_ROOT'] . "/logo.png", "logo", "logo.png");
-
- $body = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/email.html");
- $body = str_replace("%3", date('Y'), $body);
- $body = str_replace("%2", l("lang_email_reasons_update"), $body);
- $body = str_replace("%1", "<p>" . l("lang_email_plan_message_0") . "</p><p>" . str_replace("%2", $monthFee, str_replace("%1", "<b>" . $name . "</b>", l("lang_email_plan_message_1"))) . "</p><p>" . l("lang_email_plan_message_2") . "</p><p>" . l("lang_email_plan_message_3") . "</p>", $body);
-
- $mail->CharSet = 'UTF-8';
- $mail->Body = $body;
- $mail->AltBody = strip_tags($body);
-
- $mail->send();
-}
-
function sendAlerts($email, $alerts) {
global $emailConfig;