emailheader = 'Email fra '.Config::get('site_name').'
img
img
'; $this->emailfooter = '
img
Tak fordi du støtter din lokale klub.
'; } function sendWelcomeHelper($user, $email, $pass, $code, $cryptemail){ try { ob_start(); //STARTS THE OUTPUT BUFFER include (VIEWS_PATH.DS.'email'.DS.'welcome_helper.html'); //INCLUDES YOUR PHP PAGE AND EXECUTES THE PHP IN THE FILE $some_page_contents = ob_get_contents() ; //PUT THE CONTENTS INTO A VARIABLE ob_clean(); //CLEAN OUT THE OUTPUT BUFFER $mail = new PHPMailer(true); $mail->Host = Config::get('mailer.host'); $mail->SMTPAuth = Config::get('mailer.smtpAuth'); // $mail->SMTPDebug = 2; $mail->Username = Config::get('mailer.user'); $mail->Port = Config::get('mailer.smtp_port'); $mail->Password = Config::get('mailer.password'); if (Config::get('mailer.smtp_usetls')) { $mail->SMTPAutoTLS = false; $mail->SMTPSecure = 'tls'; } else { $mail->IsSMTP(); } $mail->From = Config::get('mailer.from_email'); $mail->FromName = Config::get('mailer.from_name'); $mail->AddAddress($email, $user); // $mail->AddBCC("admin@heimdaldata.dk","Admin"); $mail->AddReplyTo(Config::get('mailer.from_email'), Config::get('mailer.from_name')); $mail->SetLanguage('dk', 'PHPMailer_5.2.4/language/'); $mail->CharSet = 'UTF-8'; $mail->WordWrap = 50; $mail->IsHTML(true); $mail->Subject = Config::get('SHOP_NAME').' - velkommen!'; $mail->Body = $some_page_contents; $mail->Send(); } catch (phpmailerException $e) { echo $e->errorMessage(); return false; } catch (Exception $e) { echo $e->getMessage(); return false; } return true; } function sendResetPassword($user, $email, $code, $cryptemail){ try { ob_start(); //STARTS THE OUTPUT BUFFER include (VIEWS_PATH.DS.'emails'.DS.'reset_password.php'); //INCLUDES YOUR PHP PAGE AND EXECUTES THE PHP IN THE FILE $some_page_contents = ob_get_contents() ; //PUT THE CONTENTS INTO A VARIABLE ob_clean(); //CLEAN OUT THE OUTPUT BUFFER $mail = new PHPMailer(true); $mail->Host = Config::get('mailer.host'); $mail->SMTPAuth = Config::get('mailer.smtpAuth'); // $mail->SMTPDebug = 2; if (!Config::get('mailer.user')) $mail->Username = Config::get('mailer.user'); if (!Config::get('mailer.password')) $mail->Password = Config::get('mailer.password'); $mail->Port = Config::get('mailer.smtp_port'); if (Config::get('mailer.smtp_usetls')) { $mail->SMTPAutoTLS = false; $mail->SMTPSecure = 'tls'; } else { $mail->IsSMTP(); } $mail->From = Config::get('mailer.from_email'); $mail->FromName = Config::get('mailer.from_name'); $mail->AddAddress($email, $user); // $mail->AddBCC("admin@heimdaldata.dk","Admin"); $mail->AddReplyTo(Config::get('mailer.from_email'), Config::get('mailer.from_name')); $mail->SetLanguage('dk', 'PHPMailer_5.2.4/language/'); $mail->CharSet = 'UTF-8'; $mail->WordWrap = 50; $mail->IsHTML(true); $mail->Subject = Config::get('SHOP_NAME').' - nulstil!'; $mail->Body = $some_page_contents; $mail->Send(); } catch (phpmailerException $e) { echo $e->errorMessage(); return false; } catch (Exception $e) { echo $e->getMessage(); return false; } return true; } function sendEmailToUser($user, $email, $sender, $senderemail, $title, $content, $attachment = null){ try { ob_start(); //STARTS THE OUTPUT BUFFER include (VIEWS_PATH.DS.'email'.DS.'message.html'); //INCLUDES YOUR PHP PAGE AND EXECUTES THE PHP IN THE FILE $some_page_contents = ob_get_contents() ; //PUT THE CONTENTS INTO A VARIABLE ob_clean(); //CLEAN OUT THE OUTPUT BUFFER $mail = new PHPMailer(true); $mail->Host = Config::get('mailer.host'); $mail->SMTPAuth = Config::get('mailer.smtpAuth'); // $mail->SMTPDebug = 2; $mail->Username = Config::get('mailer.user'); $mail->Port = Config::get('mailer.smtp_port'); $mail->Password = Config::get('mailer.password'); if (Config::get('mailer.smtp_usetls')) { $mail->SMTPAutoTLS = false; $mail->SMTPSecure = 'tls'; } else { $mail->IsSMTP(); } $mail->From = Config::get('mailer.from_email'); $mail->FromName = Config::get('mailer.from_name'); $mail->AddAddress($email, $user); // $mail->AddBCC("admin@heimdaldata.dk","Admin"); $mail->AddReplyTo($senderemail, $sender); $mail->SetLanguage('dk', 'PHPMailer_5.2.4/language/'); $mail->CharSet = 'UTF-8'; $mail->WordWrap = 50; $mail->IsHTML(true); $mail->Subject = $title; $mail->Body = $some_page_contents; if (!empty($attachment)) $mail->AddAttachment(PDF_PATH.DS.strtolower($attachment)); $mail->Send(); } catch (phpmailerException $e) { echo $e->errorMessage(); return false; } catch (Exception $e) { echo $e->getMessage(); return false; } return true; } function sendNewPass($user, $email, $pass){ try { $mail = new PHPMailer(true); ob_start(); //STARTS THE OUTPUT BUFFER include (VIEWS_PATH.DS.'email'.DS.'user_newpassword.html'); //INCLUDES YOUR PHP PAGE AND EXECUTES THE PHP IN THE FILE $some_page_contents = ob_get_contents() ; //PUT THE CONTENTS INTO A VARIABLE ob_clean(); //CLEAN OUT THE OUTPUT BUFFER $mail = new PHPMailer(true); $mail->Host = Config::get('mailer.host'); $mail->SMTPAuth = Config::get('mailer.smtpAuth'); // $mail->SMTPDebug = 2; $mail->Username = Config::get('mailer.user'); $mail->Port = Config::get('mailer.smtp_port'); $mail->Password = Config::get('mailer.password'); if (Config::get('mailer.smtp_usetls')) { $mail->SMTPAutoTLS = false; $mail->SMTPSecure = 'tls'; } else { $mail->IsSMTP(); } $mail->From = Config::get('mailer.from_email'); $mail->FromName = Config::get('mailer.from_name'); $mail->AddAddress($email, $user); // $mail->AddBCC("admin@heimdaldata.dk","Admin"); $mail->AddReplyTo(Config::get('mailer.from_email'), Config::get('mailer.from_name')); $mail->SetLanguage('dk', 'PHPMailer_5.2.4/language/'); $mail->CharSet = 'UTF-8'; $mail->WordWrap = 50; $mail->IsHTML(true); $mail->Subject = Config::get('SHOP_NAME').' - nyt kodeord!'; $mail->Body = $some_page_contents; $mail->Send(); } catch (phpmailerException $e) { echo $e->errorMessage(); return false; } catch (Exception $e) { echo $e->getMessage(); return false; } return true; } function sendMessageFromUser($user, $email, $message){ try { $mail = new PHPMailer(true); $mail->Host = Config::get('mailer.host'); $mail->SMTPAuth = true; // $mail->SMTPDebug = 2; $mail->Username = Config::get('mailer.user'); $mail->Port = Config::get('mailer.smtp_port'); $mail->Password = Config::get('mailer.password'); if (Config::get('mailer.smtp_usetls')) { $mail->SMTPAutoTLS = false; $mail->SMTPSecure = 'tls'; } else { $mail->IsSMTP(); } $mail->From = $email; $mail->FromName = $user; $mail->AddAddress( "po@betbuzz.dk", Config::get('mailer.from_name')); $mail->AddBCC("admin@heimdaldata.dk","Admin"); $mail->AddReplyTo(Config::get('mailer.from_email'), Config::get('mailer.from_name')); $mail->SetLanguage('dk', 'PHPMailer_5.2.4/language/'); $mail->CharSet = 'UTF-8'; $mail->WordWrap = 50; $mail->IsHTML(true); $mail->Subject = Config::get('site_name').' - Besked!'; $mail->Body = $this->emailheader.'

Besked fra følgende:

Bruger: '.$user.'('.$email.')

Besked: '.$message.'

Venlig hilsen

'.Config::get('site_name').'
'.Config::get('site_name').'

'.$this->emailfooter; $mail->Send(); } catch (phpmailerException $e) { echo $e->errorMessage(); return false; } catch (Exception $e) { echo $e->getMessage(); return false; } return true; } }; /* Initialize mailer object */ $mailer = new Mailer; ?>
Fatal error: Uncaught Error: Class "core\Mailer" not found in /var/www/vhosts/suspicious-ganguly.88-99-99-6.plesk.page/httpdocs/core/app.php:58 Stack trace: #0 /var/www/vhosts/suspicious-ganguly.88-99-99-6.plesk.page/httpdocs/webroot/index.php(17): core\App::run() #1 {main} thrown in /var/www/vhosts/suspicious-ganguly.88-99-99-6.plesk.page/httpdocs/core/app.php on line 58