SMTP Mail problemi

adbense

OpenCart-TR
Katılım
5 Eyl 2009
Mesajlar
2
Tepkime puanı
0
Puanları
0
Merhaba..

Öncelikle Opencart sürümünü türkçeleştirdiğiniz için teşekkür ederim.Çok kullanışlı ve mağaza sahibinin esnek ihtiyaçlarını çok rahatlıkla uygulayabileceği (ortak ödeme sayfası için gerekli koldarın eklenmesi vb.) bir script.

Scriptin admin panelinde genel ayarlarda yaptığım değişiklikleri veritabanına kaydediyor görünüyor fakat tekrar panele üst menüden tıklayıp girdiğimde ayarların kaydedilmediğini görüyorum.Tek tek phpmyadmin panelinden ayarları güncellemek gerekiyor.Bunun bilindik bir çözümü var mıdır?

Ayrıca mail sorunu da yaşıyorum.SMTP olarak seçip diğer sitelerimde kullandığım ayarlarla kaydetmeme rağmen hala mail fonksyonu çalışmıyor.

Opencart resmi forumlarında bu konuyla ilgili (mail.php dosyasının düzenlenmesi gibi) bir çözüm var görünüyor.Bu çözümü uyguladığımda ise hata vermiyor fakat yine mail göndermiyor..

Bu konuda bildiğiniz bir çözüm var mıdır?

İyi çalışmalar..
Demo sitenizde şuan smtp aktif görünüyor.Nasıl bir ayar yaptığınızı paylaşabilir misiniz çok acil lütfen..
 

admin

Administrator
Yönetici
Katılım
13 Ağu 2009
Mesajlar
3,200
Tepkime puanı
1
Puanları
38
Yaş
38
Konum
Bursa
Web sitesi
www.opencart-tr.com
Demo sitede PHP Mail aktif SMTP mailin ayarlarını yapmadım yani ilk kurulduğu haliyle. Gecici bir yönetici hesap oluşturup özel mesajla yollayabilir misiniz birde ben kontrol edebilirim.

Ayarların kaydedilmemesi şunlardan dolayı olabilir.
Hoş geldiniz mesajına birşeyler yazmalısınız.
İki dil kullanıyorsanız her iki dilde de doldurulması gereken yerleri doldurmalısınız.
Veritabanına tam erişim yetkinizin olduğuna emin olunuz.
 

adbense

OpenCart-TR
Katılım
5 Eyl 2009
Mesajlar
2
Tepkime puanı
0
Puanları
0
Cevap için teşekkürler.

Sorun panelde ayarları kaydedemediğimden kaynaklanmıyormuş.Ben hoşgeldiniz mesajı istemiyordum.

Bu sebepten boş bırakıyordum.Bunun için kaydetmemiş haklısınız.

Şimdi hoşgeldiniz kısmını boş bırakmadım birşeyler yazdım fakat temadan kaldırdım.Herşey yolunda.Ayarları kaydedebiliyorum ve hoşgeldin mesajı çıkmıyor.

Tek sorun ayarları kaydedebildiğim halde neden smtp çalışmıyor :) Diğer scriptlerde denediğim mail ayarları (hatta aynı sitede farklı scriptlerde çalışan ayarlar) bu scriptte çalışmıyor.

Mail.php dosyasını inceledim.SMTP bilgilerini veritabanından çekip login oluyor.Bu kısımda problem yok.Login olmasa login kısmında uyarı vermesi gerekir.Farklı bir sebepten diye tahmin ediyorum.Büyük ihtimalle fputs fonksyonunda sıkıntı var çünkü 25nci porttan normal şartlarda aynı sitede farklı scriptle mail atabiliyorum.Bu sorunu araştıracağım.Çözüm bulduğumda buraya yazarım.

Bir sorum daha olacak.Kredi kartı ile ödemelerde opencart resmi sitesindeki modüller kullanılabiliyor mu? Örneğin İşbankasından sanal pos alsak modüllere entegre edebiliyor muyuz?
 

admin

Administrator
Yönetici
Katılım
13 Ağu 2009
Mesajlar
3,200
Tepkime puanı
1
Puanları
38
Yaş
38
Konum
Bursa
Web sitesi
www.opencart-tr.com
SMTP mail kullanmak isteyenler ayarlarınızı doğru bir şekilde yapmanıza rağmen "Error: AUTH LOGIN command failed!" bu hatayı alıyorsanız aşağıdaki değişikliği yapınız.

system/library/mail.php dosyasını açın ve içerisindeki bilgileri alttakilerle değiştirin.
Kod:
<?php 
final class Mail {
   protected $to;
     protected $from;
     protected $sender;
     protected $subject;
     protected $text;
     protected $html;
     protected $attachments = array();
   protected $protocol = 'mail';
   protected $hostname;
   protected $username;
   protected $password;
   protected $port = 25;
   protected $timeout = 5;
   public $charset = 'utf-8';
   public $eol = "\r\n";

   public function __construct($protocol = 'mail', $hostname = '', $username = '', $password = '', $port = '25', $timeout = '5') {
      $this->protocol = $protocol;
      $this->hostname = $hostname;
      $this->username = $username;
      $this->password = $password;
      $this->port = $port;
      $this->timeout = $timeout;   
   }
   
   public function setTo($to) {
       $this->to = $to;
     }
   
     public function setFrom($from) {
       $this->from = $from;
     }
   
   public function addheader($header, $value) {
      $this->headers[$header] = $value;
   }
   
     public function setSender($sender) {
       $this->sender = $sender;
     }

     public function setSubject($subject) {
       $this->subject = $subject;
     }
   
   public function setText($text) {
       $this->text = $text;
     }

     public function setHtml($html) {
       $this->html = $html;
     }
   
     public function addAttachment($attachments) {
       $this->attachments[] = $attachments;
     }

     public function send() {   
       if (!$this->to) {
            exit('Error: E-Mail to required!');
       }
   
       if (!$this->from) {
            exit('Error: E-Mail from required!');
       }
    
       if (!$this->sender) {
            exit('Error: E-Mail sender required!');
       }
      
      if (!$this->subject) {
            exit('Error: E-Mail subject required!');
       }
         
      if ((!$this->text) && (!$this->html)) {
            exit('Error: E-Mail message required!');
       }

      if (is_array($this->to)) {
            $to = implode(',', $this->to);
       } else {
            $to = $this->to;
       }
        
      $boundary = '----=_NextPart_' . md5(rand());  
      
      $header = '';
      
      if ($this->protocol != 'mail') {
         $header .= 'To: ' . $to . $this->eol;
         $header .= 'Subject: ' . $this->subject . $this->eol;
      }
      
      $header .= 'From: ' . $this->sender . '<' . $this->from . '>' . $this->eol; 
       $header .= 'Reply-To: ' . $this->sender . '<' . $this->from . '>' . $this->eol;   
      $header .= 'Return-Path: ' . $this->from . $this->eol;
      $header .= 'X-Mailer: PHP/' . phpversion() . $this->eol;  
       $header .= 'MIME-Version: 1.0' . $this->eol; 
      $header .= 'Content-Type: multipart/mixed; boundary="' . $boundary . '"' . $this->eol;  
   
      if (!$this->html) {
           $message  = '--' . $boundary . $this->eol;  
           $message .= 'Content-Type: text/plain; charset="' . $this->charset . '"' . $this->eol; 
           $message .= 'Content-Transfer-Encoding: base64' . $this->eol . $this->eol;
            $message .= chunk_split(base64_encode($this->text));
      } else {
           $message  = '--' . $boundary . $this->eol;
           $message .= 'Content-Type: multipart/alternative; boundary="' . $boundary . '_alt"' . $this->eol . $this->eol;
           $message .= '--' . $boundary . '_alt' . $this->eol;
           $message .= 'Content-Type: text/plain; charset="' . $this->charset . '"' . $this->eol; 
           $message .= 'Content-Transfer-Encoding: base64' . $this->eol;
     
           if ($this->text) {
              $message .= chunk_split(base64_encode($this->text));
           } else {
             $message .= chunk_split(base64_encode('This is a HTML email and your email client software does not support HTML email!'));
            }   
     
           $message .= '--' . $boundary . '_alt' . $this->eol;
            $message .= 'Content-Type: text/html; charset="' . $this->charset . '"' . $this->eol; 
            $message .= 'Content-Transfer-Encoding: base64' . $this->eol . $this->eol;
           $message .= chunk_split(base64_encode($this->html)); 
         $message .= '--' . $boundary . '_alt--' . $this->eol;      
      }
      
       foreach ($this->attachments as $attachment) {  
            $filename = basename($attachment);  
            $handle = fopen($attachment, 'r'); 
            $content = fread($handle, filesize($attachment));
      
           fclose($handle);  
     
            $message .= '--' . $boundary . $this->eol;
            $message .= 'Content-Type: application/octetstream' . $this->eol;    
            $message .= 'Content-Transfer-Encoding: base64' . $this->eol; 
            $message .= 'Content-Disposition: attachment; filename="' . $filename . '"' . $this->eol; 
            $message .= 'Content-ID: <' . $filename . '>' . $this->eol . $this->eol;
            $message .= chunk_split(base64_encode($content));
       }  

      if ($this->protocol == 'mail') {
         ini_set('sendmail_from', $this->from);
      
          mail($to, $this->subject, $message, $header);  
      } elseif ($this->protocol == 'smtp') {
         $handle = fsockopen($this->hostname, $this->port, $errno, $errstr, $this->timeout);   
         
         if (!$handle) {
            error_log('Error: ' . $errstr . ' (' . $errno . ')');
         } else {
            if (substr(PHP_OS, 0, 3) != 'WIN') {
               socket_set_timeout($handle, $this->timeout, 0);
            }
            
            while ($line = fgets($handle, 515)) {
               if (substr($line, 3, 1) == ' ') { 
                  break; 
               }
            }
         
            if (!empty($this->username)  && !empty($this->password)) {
               fputs($handle, 'EHLO ' . getenv('SERVER_NAME') . $this->eol);
               
               $reply = '';
            
               while ($line = fgets($handle, 515)) {
                  $reply .= $line;
               
                  if (substr($line, 3, 1) == ' ') { 
                     break; 
                  }
               }
            
               if (substr($reply, 0, 3) != 250) {
                  error_log('Error: EHLO not accepted from server!');
               }
               
               fputs($handle, 'AUTH LOGIN ' . $this->eol);
   
               $reply = '';
            
               while ($line = fgets($handle, 515)) {
                  $reply .= $line;
               
                  if (substr($line, 3, 1) == ' ') { 
                     break; 
                  }
               }
               
               if (substr($reply, 0, 3) != 334) {
                  error_log('Error: AUTH LOGIN not accepted from server!');
               }
   
               fputs($handle, base64_encode($this->username) . $this->eol);
   
               $reply = '';
            
               while ($line = fgets($handle, 515)) {
                  $reply .= $line;
               
                  if (substr($line, 3, 1) == ' ') { 
                     break; 
                  }
               }
               
               if (substr($reply, 0, 3) != 334) {
                  error_log('Error: Username not accepted from server!');
               }            
   
               fputs($handle, base64_encode($this->password) . $this->eol);
   
               $reply = '';
            
               while ($line = fgets($handle, 515)) {
                  $reply .= $line;
               
                  if (substr($line, 3, 1) == ' ') { 
                     break; 
                  }
               }
               
               if (substr($reply, 0, 3) != 235) {
                  error_log('Error: Password not accepted from server!');               
               }   
            } else {
               fputs($handle, 'HELO ' . getenv('SERVER_NAME') . $this->eol);
   
               $reply = '';
            
               while ($line = fgets($handle, 515)) {
                  $reply .= $line;
               
                  if (substr($line, 3, 1) == ' ') { 
                     break; 
                  }
               }
               
               if (substr($reply, 0, 3) != 250) {
                  error_log('Error: HELO not accepted from server!');
               }            
            }
   
            fputs($handle, 'MAIL FROM: <' . $this->from . '>XVERP' . $this->eol);
   
            $reply = '';
         
            while ($line = fgets($handle, 515)) {
               $reply .= $line;
            
               if (substr($line, 3, 1) == ' ') { 
                  break; 
               }
            }
            
            if (substr($reply, 0, 3) != 250) {
               error_log('Error: MAIL FROM not accepted from server!');
            }
            
            if (!is_array($this->to)) {
               fputs($handle, 'RCPT TO: <' . $this->to . '>' . $this->eol);
      
               $reply = '';
            
               while ($line = fgets($handle, 515)) {
                  $reply .= $line;
               
                  if (substr($line, 3, 1) == ' ') { 
                     break; 
                  }
               }
            
               if ((substr($reply, 0, 3) != 250) && (substr($reply, 0, 3) != 251)) {
                  error_log('Error: RCPT TO not accepted from server!');
               }         
            } else {
               foreach ($this->to as $recipient) {
                  fputs($handle, 'RCPT TO: <' . $recipient . '>' . $this->eol);
         
                  $reply = '';
               
                  while ($line = fgets($handle, 515)) {
                     $reply .= $line;
                  
                     if (substr($line, 3, 1) == ' ') { 
                        break; 
                     }
                  }
               
                  if ((substr($reply, 0, 3) != 250) && (substr($reply, 0, 3) != 251)) {
                     error_log('Error: RCPT TO not accepted from server!');
                  }                  
               }
            }
   
            fputs($handle, 'DATA' . $this->eol);
   
            $reply = '';
         
            while ($line = fgets($handle, 515)) {
               $reply .= $line;
            
               if (substr($line, 3, 1) == ' ') { 
                  break; 
               }
            }
                  
            if (substr($reply, 0, 3) != 354) {
               error_log('Error: DATA not accepted from server!');
            }
            
            fputs($handle, $header . $message . $this->eol);
            fputs($handle, '.' . $this->eol);
            
            $reply = '';
         
            while ($line = fgets($handle, 515)) {
               $reply .= $line;
            
               if (substr($line, 3, 1) == ' ') { 
                  break; 
               }
            }
            
            if (substr($reply, 0, 3) != 250) {
               error_log('Error: DATA not accepted from server!');
            }
   
            fputs($handle, 'QUIT' . $this->eol);
   
            $reply = '';
         
            while ($line = fgets($handle, 515)) {
               $reply .= $line;
            
               if (substr($line, 3, 1) == ' ') { 
                  break; 
               }
            }
            
            if (substr($reply, 0, 3) != 221) {
               error_log('Error: QUIT not accepted from server!');
            }         
            
            fclose($handle);
         }
      }
   }
}
?>
 

M.Fidan

OpenCart-TR
Katılım
6 Eki 2009
Mesajlar
33
Tepkime puanı
0
Puanları
0
Çok güzel çalışıyor. Tşkler hocam.
 

ateshb

OpenCart-TR
Katılım
22 Eki 2009
Mesajlar
23
Tepkime puanı
0
Puanları
0
bende halen çalışmıyor.. ayrlar doğru olmasına rağmen.. nasıl çözerim aceba..
 

admin

Administrator
Yönetici
Katılım
13 Ağu 2009
Mesajlar
3,200
Tepkime puanı
1
Puanları
38
Yaş
38
Konum
Bursa
Web sitesi
www.opencart-tr.com
Aldığınız hata, uyarı gibi şeyler hakkında daha fazla ayrıntı verirseniz. Sorununuz daha çabuk çözüme kavuşabilir.

Ayrıca hoş geldiniz mesajını boş bırakıyorsanız ayarlar kaydedilmemiş olabilir. Buraya bir şeyler yazmalısınız. Tekrar kontrol ediniz.
 

ateshb

OpenCart-TR
Katılım
22 Eki 2009
Mesajlar
23
Tepkime puanı
0
Puanları
0
merhaba,

cevap için şimdiden teşekkürler..

Ben halen mail gönderip alamıyorum.. Herhangi bir hata mesajı da vermiyor sadece mailiniz gönderildi diyor fakat mailler ulaşmıyor..

iki ayrı sunucum var her ikisinde de denedim fakat olmadı aynı sunucularda farklı scriptler de kullanıyorum onlarda sorun yok.. benim sunucu sendmail desteklemiyor bu nedenle herzaman kullandığım smtp ayarlarını kullanıyorum fakat sonuç aynı.. hoşgeldin mesajını da doldurdum.. ayarların kayıt edildiğini de görüyorum.. şu an kullandığım versiyon fulltr 132 ..
aynı sunucuya softacoulous dan ingilizce olarak yükledi orada mailler gidiyor.. ne tür bir alaka var bilemedim.. yukarıda vermiş olduğunuz değişikliği yaptım mail.php de fakat sayfa bozuldu.. komple olarak içeriğini verdiğiniz bilgi ile değiştirdim ve sayfa bozuldu.. nerede hata yaptım aceba..

iyi çalışmalar..
ateş başak
Bir kez de bu mesajı aldım Error:EHLO command failed.

smtp ayarları yaparken aluştu..

birde benim hosthizmeti yetkilisi şunu söyledi port olarak 25 i telekom yasaklamış .. ben başka ayar giriyorum fakat gönderildi dediği halde her iki ayarda göndermiyor.. port ayarını değiştirdiğim zaman hata veriyor.. sanırım mail.php de 25 olarak sabitmi?
 

admin

Administrator
Yönetici
Katılım
13 Ağu 2009
Mesajlar
3,200
Tepkime puanı
1
Puanları
38
Yaş
38
Konum
Bursa
Web sitesi
www.opencart-tr.com
evet 25.porta yasaklama gelmiş. Admin panelinden smtp ayarlarını yaparken 587. portu kullanabilirsiniz.

Hangi sürümü kullanıyorsunuz. 1.3.2 ise birde 1.3.3 deki mail.php dosyası ile değiştirerek dener misniz?

mail.php deki varsayılan değerdir. admin paneline girdiğiniz değer kullanılacaktır.
 

burgut

OpenCart-TR
Katılım
21 Eki 2009
Mesajlar
8
Tepkime puanı
0
Puanları
0
Ben de şu şekilde bir düzenleme yaptım:

e-Posta Protokol: SMTP
SMTP Host: mail.siteadi.com
SMTP Kullanıcı Adı: customer+siteadi.com
SMTP Parola: Şifrem
SMTP Port: 587
SMTP Zaman Aşımı:5

ve aynı hatayı aldım.

SMTP Kullanıcı adını: sadece customer yaptım, sonuç aynı.. EHLO hatası alıp ta çözebilen biris yok mu acaba?

openCart kendi sitesinde yöneticinin meyilini buldum. Aşağıdaki kodları system/library/mail.php dosyası içindekilerle değiştirin diyor. Ancak ben kodları biraz incelediğimde burada SMTP portu için 25 görülüyor. Biz sevgili TTnet için herşeye burnunu sokması neticesi biliyorsunuz 587. portu kullanıyoruz artık. 25 yerine 587 yazarsanız da bir sürü hata veriyor ve site Türkçe olmaktan çıkıp Tarzanca halini alıyor. Denemesi bedava.

http://forum.opencart.com/viewtopic.php?f=31&t=5740 sayfa bu..

Bir de PHP Mail nasıl ayarlanıyor, bilen var mı? Bari onu kullanalım.

YENİLENECEK KODLAR:

Kod:
  <?php
    final class Mail {
       protected $to;
         protected $from;
         protected $sender;
         protected $subject;
         protected $text;
         protected $html;
         protected $attachments = array();
       protected $protocol = 'mail';
       protected $hostname;
       protected $username;
       protected $password;
       protected $port = 25;
       protected $timeout = 5;
       public $charset = 'utf-8';
       public $eol = "\r\n";

       public function __construct($protocol = 'mail', $hostname = '', $username = '', $password = '', $port = '25', $timeout = '5') {
          $this->protocol = $protocol;
          $this->hostname = $hostname;
          $this->username = $username;
          $this->password = $password;
          $this->port = $port;
          $this->timeout = $timeout;   
       }
       
       public function setTo($to) {
           $this->to = $to;
         }
       
         public function setFrom($from) {
           $this->from = $from;
         }
       
       public function addheader($header, $value) {
          $this->headers[$header] = $value;
       }
       
         public function setSender($sender) {
           $this->sender = $sender;
         }

         public function setSubject($subject) {
           $this->subject = $subject;
         }
       
       public function setText($text) {
           $this->text = $text;
         }

         public function setHtml($html) {
           $this->html = $html;
         }
       
         public function addAttachment($attachments) {
           $this->attachments[] = $attachments;
         }

         public function send() {   
           if (!$this->to) {
                exit('Error: E-Mail to required!');
           }
       
           if (!$this->from) {
                exit('Error: E-Mail from required!');
           }
       
           if (!$this->sender) {
                exit('Error: E-Mail sender required!');
           }
          
          if (!$this->subject) {
                exit('Error: E-Mail subject required!');
           }
             
          if ((!$this->text) && (!$this->html)) {
                exit('Error: E-Mail message required!');
           }

          if (is_array($this->to)) {
                $to = implode(',', $this->to);
           } else {
                $to = $this->to;
           }
            
          $boundary = '----=_NextPart_' . md5(rand()); 
          
          $header = '';
          
          if ($this->protocol != 'mail') {
             $header .= 'To: ' . $to . $this->eol;
             $header .= 'Subject: ' . $this->subject . $this->eol;
          }
          
          $header .= 'From: ' . $this->sender . '<' . $this->from . '>' . $this->eol;
           $header .= 'Reply-To: ' . $this->sender . '<' . $this->from . '>' . $this->eol;   
          $header .= 'Return-Path: ' . $this->from . $this->eol;
          $header .= 'X-Mailer: PHP/' . phpversion() . $this->eol; 
           $header .= 'MIME-Version: 1.0' . $this->eol;
          $header .= 'Content-Type: multipart/mixed; boundary="' . $boundary . '"' . $this->eol; 
       
          if (!$this->html) {
               $message  = '--' . $boundary . $this->eol; 
               $message .= 'Content-Type: text/plain; charset="' . $this->charset . '"' . $this->eol;
               $message .= 'Content-Transfer-Encoding: base64' . $this->eol . $this->eol;
                $message .= chunk_split(base64_encode($this->text));
          } else {
               $message  = '--' . $boundary . $this->eol;
               $message .= 'Content-Type: multipart/alternative; boundary="' . $boundary . '_alt"' . $this->eol . $this->eol;
               $message .= '--' . $boundary . '_alt' . $this->eol;
               $message .= 'Content-Type: text/plain; charset="' . $this->charset . '"' . $this->eol;
               $message .= 'Content-Transfer-Encoding: base64' . $this->eol;
        
               if ($this->text) {
                  $message .= chunk_split(base64_encode($this->text));
               } else {
                 $message .= chunk_split(base64_encode('This is a HTML email and your email client software does not support HTML email!'));
                }   
        
               $message .= '--' . $boundary . '_alt' . $this->eol;
                $message .= 'Content-Type: text/html; charset="' . $this->charset . '"' . $this->eol;
                $message .= 'Content-Transfer-Encoding: base64' . $this->eol . $this->eol;
               $message .= chunk_split(base64_encode($this->html));
             $message .= '--' . $boundary . '_alt--' . $this->eol;      
          }
          
           foreach ($this->attachments as $attachment) { 
                $filename = basename($attachment); 
                $handle = fopen($attachment, 'r');
                $content = fread($handle, filesize($attachment));
         
               fclose($handle); 
        
                $message .= '--' . $boundary . $this->eol;
                $message .= 'Content-Type: application/octetstream' . $this->eol;   
                $message .= 'Content-Transfer-Encoding: base64' . $this->eol;
                $message .= 'Content-Disposition: attachment; filename="' . $filename . '"' . $this->eol;
                $message .= 'Content-ID: <' . $filename . '>' . $this->eol . $this->eol;
                $message .= chunk_split(base64_encode($content));
           } 

          if ($this->protocol == 'mail') {
             ini_set('sendmail_from', $this->from);
          
              mail($to, $this->subject, $message, $header); 
          } elseif ($this->protocol == 'smtp') {
             $handle = fsockopen($this->hostname, $this->port, $errno, $errstr, $this->timeout);   
             
             if (!$handle) {
                error_log('Error: ' . $errstr . ' (' . $errno . ')');
             } else {
                if (substr(PHP_OS, 0, 3) != 'WIN') {
                   socket_set_timeout($handle, $this->timeout, 0);
                }
                
                while ($line = fgets($handle, 515)) {
                   if (substr($line, 3, 1) == ' ') {
                      break;
                   }
                }
             
                if (!empty($this->username)  && !empty($this->password)) {
                   fputs($handle, 'EHLO ' . getenv('SERVER_NAME') . $this->eol);
                   
                   $reply = '';
                
                   while ($line = fgets($handle, 515)) {
                      $reply .= $line;
                   
                      if (substr($line, 3, 1) == ' ') {
                         break;
                      }
                   }
                
                   if (substr($reply, 0, 3) != 250) {
                      error_log('Error: EHLO not accepted from server!');
                   }
                   
                   fputs($handle, 'AUTH LOGIN ' . $this->eol);
       
                   $reply = '';
                
                   while ($line = fgets($handle, 515)) {
                      $reply .= $line;
                   
                      if (substr($line, 3, 1) == ' ') {
                         break;
                      }
                   }
                   
                   if (substr($reply, 0, 3) != 334) {
                      error_log('Error: AUTH LOGIN not accepted from server!');
                   }
       
                   fputs($handle, base64_encode($this->username) . $this->eol);
       
                   $reply = '';
                
                   while ($line = fgets($handle, 515)) {
                      $reply .= $line;
                   
                      if (substr($line, 3, 1) == ' ') {
                         break;
                      }
                   }
                   
                   if (substr($reply, 0, 3) != 334) {
                      error_log('Error: Username not accepted from server!');
                   }            
       
                   fputs($handle, base64_encode($this->password) . $this->eol);
       
                   $reply = '';
                
                   while ($line = fgets($handle, 515)) {
                      $reply .= $line;
                   
                      if (substr($line, 3, 1) == ' ') {
                         break;
                      }
                   }
                   
                   if (substr($reply, 0, 3) != 235) {
                      error_log('Error: Password not accepted from server!');               
                   }   
                } else {
                   fputs($handle, 'HELO ' . getenv('SERVER_NAME') . $this->eol);
       
                   $reply = '';
                
                   while ($line = fgets($handle, 515)) {
                      $reply .= $line;
                   
                      if (substr($line, 3, 1) == ' ') {
                         break;
                      }
                   }
                   
                   if (substr($reply, 0, 3) != 250) {
                      error_log('Error: HELO not accepted from server!');
                   }            
                }
       
                fputs($handle, 'MAIL FROM: <' . $this->from . '>XVERP' . $this->eol);
       
                $reply = '';
             
                while ($line = fgets($handle, 515)) {
                   $reply .= $line;
                
                   if (substr($line, 3, 1) == ' ') {
                      break;
                   }
                }
                
                if (substr($reply, 0, 3) != 250) {
                   error_log('Error: MAIL FROM not accepted from server!');
                }
                
                if (!is_array($this->to)) {
                   fputs($handle, 'RCPT TO: <' . $this->to . '>' . $this->eol);
          
                   $reply = '';
                
                   while ($line = fgets($handle, 515)) {
                      $reply .= $line;
                   
                      if (substr($line, 3, 1) == ' ') {
                         break;
                      }
                   }
                
                   if ((substr($reply, 0, 3) != 250) && (substr($reply, 0, 3) != 251)) {
                      error_log('Error: RCPT TO not accepted from server!');
                   }         
                } else {
                   foreach ($this->to as $recipient) {
                      fputs($handle, 'RCPT TO: <' . $recipient . '>' . $this->eol);
             
                      $reply = '';
                   
                      while ($line = fgets($handle, 515)) {
                         $reply .= $line;
                      
                         if (substr($line, 3, 1) == ' ') {
                            break;
                         }
                      }
                   
                      if ((substr($reply, 0, 3) != 250) && (substr($reply, 0, 3) != 251)) {
                         error_log('Error: RCPT TO not accepted from server!');
                      }                  
                   }
                }
       
                fputs($handle, 'DATA' . $this->eol);
       
                $reply = '';
             
                while ($line = fgets($handle, 515)) {
                   $reply .= $line;
                
                   if (substr($line, 3, 1) == ' ') {
                      break;
                   }
                }
                      
                if (substr($reply, 0, 3) != 354) {
                   error_log('Error: DATA not accepted from server!');
                }
                
                fputs($handle, $header . $message . $this->eol);
                fputs($handle, '.' . $this->eol);
                
                $reply = '';
             
                while ($line = fgets($handle, 515)) {
                   $reply .= $line;
                
                   if (substr($line, 3, 1) == ' ') {
                      break;
                   }
                }
                
                if (substr($reply, 0, 3) != 250) {
                   error_log('Error: DATA not accepted from server!');
                }
       
                fputs($handle, 'QUIT' . $this->eol);
       
                $reply = '';
             
                while ($line = fgets($handle, 515)) {
                   $reply .= $line;
                
                   if (substr($line, 3, 1) == ' ') {
                      break;
                   }
                }
                
                if (substr($reply, 0, 3) != 221) {
                   error_log('Error: QUIT not accepted from server!');
                }         
                
                fclose($handle);
             }
          }
       }
    }
    ?>

Evet, İngilizcede belki sorunu çözebilir. Ancak Türkçe sitede Admin panelin Türkçe karakterlerini bozuyor ve menüler çalışmaz hale geliyor. Frontend te tamamen uçup bembeyaz bir sayfa açıyor. opencartın sitesinde bu çözümü önermişler. Belki İngilizce forumda emailller de gidiyordur. Ancak Türkçe sitede gümlüyor.

PHP Maili nasıl kullanaibleceğimize dair bilginiz var mı? Onun ayarları nasıl yapıalacak?
 

admin

Administrator
Yönetici
Katılım
13 Ağu 2009
Mesajlar
3,200
Tepkime puanı
1
Puanları
38
Yaş
38
Konum
Bursa
Web sitesi
www.opencart-tr.com
Şuan deneme yapamadığım içi birşey diyemiyeceğim. Ama yazdığınız kod eski bir konuya ait 1.3.4 sürümünün içindeki daha güncelldir.

Php Mail için hostunuzda php webmail kurulu olması gerekir. Bunun dışında bir ayar yapmanıza gerek yok. gmail hesabınız varsa birde onun smtp ayarlarını kullanarak deneyiniz.

Spam yapmadan yazdığın konuyu düzenleyerek yazarsan sevinirim.
 

hyavuz

OpenCart-TR
Katılım
29 Ara 2009
Mesajlar
3
Tepkime puanı
0
Puanları
0
ateshb arkadaşın yazdığı gibi bende de aynı mail gönderildi diyor ama mailler ulaşmıyor.
buna bir çözüm bulabilecekmiyiz.
 

phanonic

OpenCart-TR
Katılım
10 Ocak 2010
Mesajlar
2
Tepkime puanı
0
Puanları
0
Bende şu şekilde bir hata mesajı var.

Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. 15sm2307341ewy.4 in ...
php.ini ayarlarından;
smtp_port = 587
olarak ayarladıktan sonra bu şekilde bir hata verdi. Benim anlamadım şimdi php mail yollamak için illaki SSL sertifikasımı gerekiyor?
 

mayfa

OpenCart-TR
Katılım
17 Şub 2010
Mesajlar
1
Tepkime puanı
0
Puanları
0
Aynı sorun bendede var çözümü bulan bi arkadaş yokmu acaba?
 

ilkayturkoglu

OpenCart-TR
Katılım
7 Ara 2009
Mesajlar
39
Tepkime puanı
0
Puanları
0
Sorun çözüldü tşk ederim,fakat müşterilere mail gönderdiğimde aşağıda yazan hataları alıyorum, ama mail sorunsuz olarak gidiyor, bu hataların nedeni nedir acaba ?

Kod:
Warning: basename() expects parameter 1 to be string, array given in /home/xxxxxx/public_html/system/library/mail.php on line 129Warning: fopen() expects parameter 1 to be string, array given in /home/xxxxxx/public_html/system/library/mail.php  on line 130Notice: Array to string conversion in /home/xxxxxx/public_html/system/library/mail.php  on line 131Warning: filesize() [function.filesize]: stat failed for Array in /home/xxxxxx/public_html/system/library/mail.php  on line 131Warning: fread(): supplied argument is not a valid stream resource in /home/xxxxxx/public_html/system/library/mail.php  on line 131Warning: fclose(): supplied argument is not a valid stream resource in /home/xxxxxx/public_html/system/library/mail.php  on line 133
 

sarigulsahaf

OpenCart-TR
Katılım
29 Mar 2010
Mesajlar
12
Tepkime puanı
0
Puanları
0
Arkadaşlar bende siteden müşteri mesaj atmak isterse çalışıyor mesaj bana ulaşıyor. Ancak ben admin panelinden müşterilere mesaj atmak isteyince şöyle bir hata çıkıyor:

Admin panelin döndürdüğü hata' Alıntı:
Bakmak istediğiniz sayfa gösterilemiyor, çünkü sayfada geçersiz ya da desteklenmeyen bir biçimde sıkıştırma kullanılıyor. Bu sorundan haberdar etmek için lütfen site sahipleriyle temasa geçin.
 

smart176

OpenCart-TR
Katılım
12 Eki 2009
Mesajlar
22
Tepkime puanı
0
Puanları
0
Smtp Mail Çözüm

Merhaba Arkadaşlar

forum da bir çok bu konu hakkında topic açılmış ama benim çözümüm onların içinde yoktu,

opencart 1.4.4 sürümünü kurdum herşey yolunda tek problem hiç bir şekilde ne iletişim ne satış bölümünde mail gelmiyor ve gitmiyor, hostumda sorun yok
acaba 1.4.4 mail.php dosyası sorunlu olabilirmi ?

e-osta ayarlarım aşağıdaki gibidir.
E-Posta Protokol:SMTP

SMTP Host: mail.websayfam.net
SMTP Kullanıcı Adı:satis@kwebsayfam.net
SMTP Parola:xxxxxx
SMTP Port: 587
SMTP Zaman Aşımı:5
 

mirac

OpenCart-TR
Katılım
7 Şub 2010
Mesajlar
1,383
Tepkime puanı
0
Puanları
36
Yaş
42
Konum
Beykoz____
Web sitesi
www.notebook-cantasi.com
sarigulsahaf' Alıntı:
Arkadaşlar bende siteden müşteri mesaj atmak isterse çalışıyor mesaj bana ulaşıyor. Ancak ben admin panelinden müşterilere mesaj atmak isteyince şöyle bir hata çıkıyor:

Admin panelin döndürdüğü hata' Alıntı:
Bakmak istediğiniz sayfa gösterilemiyor, çünkü sayfada geçersiz ya da desteklenmeyen bir biçimde sıkıştırma kullanılıyor. Bu sorundan haberdar etmek için lütfen site sahipleriyle temasa geçin.

smtp ayarları girildiğinde php mail seçeneğini smtp olarak değiştirin.. Sorununuz düzelir..
 

smart176

OpenCart-TR
Katılım
12 Eki 2009
Mesajlar
22
Tepkime puanı
0
Puanları
0
smtp ayarları girildiğinde php mail seçeneğini smtp olarak değiştirin.. Sorununuz düzelir..
[/quote]


merhaba;
verdiğiniz cevap çok basit onu sanırım zaten herkes dikkat ediyordur, genel anlamda bir kodsal sanırsam bir sorun var ve bu durumdan mağduruz. yardımlarınızı rica ediyorum.

mail hiç bir şekilde gelmiyor buna sebep ne olabilir. ?

teşekkürler
 
Üst