Bu trimitere e-mail recuperare parolă

Închis
Avatar utilizator
Vladut9797
Nou Venit

Nou Venit
Mesaje: 49
Membru din: 06 Oct 2013, 09:32
Server: KowMetin2.ga
Regat: Chunjo
Aprecieri: 0
Mulţumiri: 0
Medalii

Salut J4M după cum spune și titl-ul am un bug la homepage by DarkDev,efectiv nu trimite de loc.
Nu îmi trimite mesaj de recuperare parolă. schimbă parola /e-mail
Ce am înceract: Am făcut adresă specială din MYSQL,la fel nu trimite
Am agăugat la $website lik-ul către site,la fel nu trimite.
Am încercat să înlocuesc script-ul tot la fel.
Aveți vro rezolvare la acest bug.
Vă mulțumesc.
Avatar utilizator
Deniș
Nivel 2

Nivel 2
Mesaje: 222
Membru din: 11 Sep 2013, 22:51
Aprecieri: 2  
Mulţumiri: 327  
 Contact:
Medalii

Dă-mi adresa site-ului și postează aici fișierul problemă. ;)
Avatar utilizator
Vladut9797
Nou Venit

Nou Venit
Mesaje: 49
Membru din: 06 Oct 2013, 09:32
Server: KowMetin2.ga
Regat: Chunjo
Aprecieri: 0
Mulţumiri: 0
Medalii

Adresa este www.metin2kow.ga
Iar problema nu stiu sigu de unde este,că nu trimite deloc e-mail,o să poste mai_class poate are freo eroare

mail_class.php
<?php

class Mail {

private $smtpServer = 'mail.metin2kow.ga';

private $port = '25';

private $timeout = '45';

private $username = '[email protected]';

private $password = 'Cenzurat';

private $newline = "\n";

////////////////////////////////////////////// NU MODIFICATI ///////////////////

private $charset = 'windows-1251';

private $contentTransferEncoding = false;



// Do not change anything below

private $smtpConnect = false;

private $to = false;

private $subject = false;

private $message = false;

private $headers = false;

private $logArray = array(); // Array response message for debug

private $Error = '';



public function __construct($to, $subject, $message) {

$this->to = &$to;

$this->subject = &$subject;

$this->message = &$message;

// Connect to server

if(!$this->Connect2Server()) {

// Display error message

echo $this->Error.$this->newline.'<!-- '.$this->newline;

print_r($this->logArray);

echo $this->newline.'-->'.$this->newline;

return false;

}

return true;

}



private function Connect2Server() {

// Connect to server

$this->smtpConnect = fsockopen($this->smtpServer,$this->port,$errno,$error,$this->timeout);

$this->logArray['CONNECT_RESPONSE'] = $this->readResponse();



if (!is_resource($this->smtpConnect)) {

return false;

}

$this->logArray['connection'] = "Connection accepted: $smtpResponse";

// Hi, server!

$this->sendCommand("EHLO $this->localdomain");

$this->logArray['EHLO'] = $this->readResponse();

// Let's know each other

$this->sendCommand('AUTH LOGIN');

$this->logArray['AUTH_REQUEST'] = $this->readResponse();

// My name...

$this->sendCommand(base64_encode($this->username));

$this->logArray['REQUEST_USER'] = $this->readResponse();

// My password..

$this->sendCommand(base64_encode($this->password));

$this->logArray['REQUEST_PASSWD'] = $this->readResponse();

// If error in response auth...

if (substr($this->logArray['REQUEST_PASSWD'],0,3)!='235') {

$this->Error .= 'Authorization error! '.$this->logArray['REQUEST_PASSWD'].$this->newline;

return false;

}

// "From" mail...

$this->sendCommand("MAIL FROM: $this->username");

$this->logArray['MAIL_FROM_RESPONSE'] = $this->readResponse();

if (substr($this->logArray['MAIL_FROM_RESPONSE'],0,3)!='250') {

$this->Error .= 'Mistake in sender\'s address! '.$this->logArray['MAIL_FROM_RESPONSE'].$this->newline;

return false;

}

// "To" address

$this->sendCommand("RCPT TO: $this->to");

$this->logArray['RCPT_TO_RESPONCE'] = $this->readResponse();

if (substr($this->logArray['RCPT_TO_RESPONCE'],0,3)!='250') {

$this->Error .= 'Mistake in reciepent address! '.$this->logArray['RCPT_TO_RESPONCE'].$this->newline;

}

// Send data to server

$this->sendCommand('DATA');

$this->logArray['DATA_RESPONSE'] = $this->readResponse();

// Send mail message

if (!$this->sendMail()) return false;

// Good bye server! =)

$this->sendCommand('QUIT');

$this->logArray['QUIT_RESPONSE'] = $this->readResponse();

// Close smtp connect

fclose($this->smtpConnect);

return true;

}

// Function send mail

private function sendMail() {

$this->sendHeaders();

$this->sendCommand($this->message);

$this->sendCommand('.');

$this->logArray['SEND_DATA_RESPONSE'] = $this->readResponse();

if(substr($this->logArray['SEND_DATA_RESPONSE'],0,3)!='250') {

$this->Error .= 'Mistake in sending data! '.$this->logArray['SEND_DATA_RESPONSE'].$this->newline;

return false;

}

return true;

}

// Function read response

private function readResponse() {

$data="";

while($str = fgets($this->smtpConnect,4096))

{

$data .= $str;

if(substr($str,3,1) == " ") { break; }

}

return $data;

}

// function send command to server

private function sendCommand($string) {

fputs($this->smtpConnect,$string.$this->newline);

return ;

}

// function send headers

private function sendHeaders() {

$this->sendCommand("Date: ".date("D, j M Y G:i:s")." +0700");

$this->sendCommand("From: <$this->username>");

$this->sendCommand("Reply-To: <$this->username>");

$this->sendCommand("To: <$this->to>");

$this->sendCommand("Subject: $this->subject");

$this->sendCommand("MIME-Version: 1.0");

$this->sendCommand("Content-Type: text/plain; charset=$this->charset");

if ($this->contentTransferEncoding) $this->sendCommand("Content-Transfer-Encoding: $this->contentTransferEncoding");

$this->sendCommand($this->newline);

return ;

}



public function __destruct() {

if (is_resource($this->smtpConnect)) fclose($this->smtpConnect);

}

}

?>
Avatar utilizator
Chippy
Nou Venit

Nou Venit
Mesaje: 15
Membru din: 06 Feb 2014, 01:23
Server: Metin2 TBX
Regat: Chunjo
Aprecieri: 0
Mulţumiri: 0
Medalii

Site-ul e offline, deschide site-ul si o sa te ajut eu.
Avatar utilizator
Marius @ Mariuk3Dev.ro
Web Master

Web Master
Mesaje: 389
Membru din: 17 Iun 2014, 17:17
Server: Mariuk3dev.ro
Regat: Shinsoo
Aprecieri: 23  
Mulţumiri: 40  
 Contact:
Medalii

Din cate stiu , majoritatea aveau probleme la asta... Chestia e ca pentru toti , rezolvarea a fost simpla modificare a liniei de trimite mail.
In loc de "new mail(...); " se pune "mail(...);" , mai exact , doar stergeti new din fata.
Owner & Coder @ Darkdev.eu
Owner @ mariuk3dev.ro
Module website metin2 la comanda, modificari , suport, etc :D
De vanzare Metin2 ITEMSHOP cu iteme bonusabile
Daca primeam 1$ de la toti care imi folosesc webul :)) , eram bogat.
Afișează semnătura
Avatar utilizator
'Cristian'
Fost Moderator

Fost Moderator
Mesaje: 105
Membru din: 16 Aug 2015, 13:36
Aprecieri: 0
Mulţumiri: 3  
Medalii

Inactiv! Trimis in Arhiva.
Închis
Răspunsuri
4
Vizualizări
495
Răspunsuri
2
Vizualizări
112
Răspunsuri
0
Vizualizări
239
Răspunsuri
12
Vizualizări
7156

Înapoi la “Arhivă”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 3 vizitatori