e mail lostpassword problem

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • e mail lostpassword problem

      Lost Password Problem

      SMTP settings ok next lost password problem. Help me Thanks ?(


      Message: Could not instantiate mail function.
      File: /includes/libs/phpmailer/class.phpmailer.php
      Line: 1507
      URL: uzaydayerim.com/index.php?page=lostPassword
      PHP-Version: 5.6.40
      PHP-API: litespeed
      2Moons Version: 1.8.git
      Debug Backtrace:
      #0 /includes/libs/phpmailer/class.phpmailer.php(1337): PHPMailer->mailSend('Date: Mon, 9 Se...', 'Merhaba Imparat...')
      #1 /includes/libs/phpmailer/class.phpmailer.php(1213): PHPMailer->postSend()
      #2 /includes/classes/Mail.class.php(15): PHPMailer->send()
      #3 /includes/pages/login/ShowLostPasswordPage.class.php(197): Mail::send('aykut@uzaydayer...', 'Aykut', 'Sifremi unuttum...', 'Merhaba Imparat...')
      #4 /index.php(43): ShowLostPasswordPage->send()
      #5 {main}
    • Phpmailer version is old on 2moons. i recommend update through Composer and add simple mail function into GeneralFunctions.php

      About your problem, is your email settings right on universe config?
      Looking for good VPS to host your game? Use DigitalOcean and get 100$ bonus credit for 2 months!

      Check my mods here - stellaron.space/index.php?page=2Moons

      I can build any mod. Need my service? Contact me via PM

      The post was edited 1 time, last by Qwa ().

    • Qwa wrote:

      Phpmailer sürümü 2 ay eskidir. Composer aracılığıyla güncelleme ve GeneralFunctions.php içine basit posta işlevini eklemenizi öneririm

      Sorununuz hakkında, e-posta ayarlarınız evren yapılandırmasında doğru mu?
      evet benim ayarlarının doğru

      Şu anki sürümü kullanıyorum

      başka ne yapabileceğim
      Ben acemi değilimKendi posta sunucumu yazdığımda programın çalıştığını yazabilirim

      Geçerli sürümü nereden indirebilirim?


      Biraz İngilizce biliyorum
      thanks
    • Qwa wrote:

      Phpmailer version is old on 2moons. i recommend update through Composer and add simple mail function into GeneralFunctions.php

      About your problem, is your email settings right on universe config?
      yes my settings are correct

      I'm using the current version

      what else can i do
      When I write my own mail server, I can write that the program is running.

      Where can I download the current version?


      I know a little English
      thanks
    • New

      There are endless posts on google pointing to your error and most of them says is either server bad configuration or the code may be missing a required variable.

      Try this and change for your needs, it works for me.

      PHP Source Code

      1. use PHPMailer\PHPMailer\PHPMailer;
      2. use PHPMailer\PHPMailer\Exception as MailException;
      3. function SendMail($Recipent, $Title, $Text, $HTML, $Language = false)
      4. {
      5. // Translate for each language
      6. $MessageLang = array();
      7. foreach(Language::getAllowedLangs(false) as $LNG => $Name){
      8. include_once 'includes/classes/GoogleTranslate.php';
      9. $trans = new GoogleTranslate();
      10. $TransText = $trans->translate('auto', $target, nl2br($Text));
      11. $TransText = str_replace("</ ","</",$Text);
      12. $TransText = str_replace("% s","%s",$Text);
      13. $MessageLang[$LNG] = $TransText;
      14. }
      15. $mail = new PHPMailer(true);
      16. try {
      17. //Server settings
      18. $mail->SMTPDebug = EMAIL['debug'];
      19. $mail->isSMTP();
      20. $mail->Host = EMAIL['host'];
      21. $mail->SMTPAuth = EMAIL['smtp_auth'];
      22. $mail->Username = EMAIL['username'];
      23. $mail->Password = EMAIL['password'];
      24. $mail->SMTPSecure = EMAIL['encryption'];
      25. $mail->Port = EMAIL['tcp'];
      26. //Recipients
      27. $mail->setFrom($mail->Username, 'Stellaron');
      28. foreach ($Recipent as $Username => $Email) {
      29. $mail->addBCC($Email, $Username);
      30. }
      31. $mail->addAddress($mail->Username, "Stellaron");
      32. $mail->addReplyTo($mail->Username, 'Stellaron');
      33. // Content
      34. $mail->isHTML(true); // Set email format to HTML
      35. $mail->Subject = $Title;
      36. if ($HTML) {
      37. $mail->Body = $Text;
      38. } elseif ($Language) {
      39. $mail->Body = $MessageLang[getLanguage(NULL, $Username)];
      40. } else {
      41. $mail->Body = nl2br($Text);
      42. }
      43. $mail->send();
      44. return;
      45. } catch (MailException $e) {
      46. return $mail->ErrorInfo;
      47. }
      48. }
      Display All
      Looking for good VPS to host your game? Use DigitalOcean and get 100$ bonus credit for 2 months!

      Check my mods here - stellaron.space/index.php?page=2Moons

      I can build any mod. Need my service? Contact me via PM