Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

s7a8n9

Новачок
  
  • Публікації

    5
  • З нами

  • Відвідування

Повідомлення, опубліковані користувачем s7a8n9

  1. Ребята у меня похожая проблема:

     

    2015-01-11 0:09:40 - PHP Notice:  Error: RCPT TO not accepted from server! in /share/CACHEDEV1_DATA/.qpkg/OpenCart/web/system/library/mail.php on line 308

     

    Только разница в том, что письма ходят, а проблема возникает при попытке написать обращение во вкладке связаться с нами. Как проблему решать ума не дам, прошу помочь.

    Проблему решил путем внесения изменений в contact.php и mail.php: http://www.expertsos.net/blog/opencart-fixing-notice-error-rcpt-to-not-accepted-from-server/

     

    Позволю сделать копирайт решения:

    Opencart 1.5 Fix
    • First edit the file catalog/controller/information/contact.php

      Look for line:

      $mail->setFrom($this->request->post['email']);

      in my version it is line 20

      Change it to:

      $mail->setFrom($this->config->get('config_email'));

      What this will do is set the FROM field to be the same as your shop’s main email address.

      You can hardcode (but I wouldn’t recommend it) an email adress here if you want by changing this line to ie:

      $mail->setFrom('moc.niamodym@pohs');

    • Now find the line:

      $mail->setSender($this->request->post['name']);

      It should be below the line we just edited or somwhere near.

      Change it to:

      $mail->setReplyTo($this->request->post['email']);

      $mail->setSender($this->config->get('config_email'));

      What this will do is set your client’s email provided by him in the contact form as reply-to email, so that you’re able to respond automatically to contact form messages by clicking on Reply button.

      It is also setting your shop email address as sender’s name.

    • OK so now we need to edit system/library/mail.php file

      In the beginning you will have line:

      protected $subject;

      Just add this before it:

      protected $replyto;

    • Find line:

      public function setSender($sender) {

      and before it add:

      public function setReplyTo($reply_to) {

      $this->replyto = html_entity_decode($reply_to, ENT_QUOTES, 'UTF-8');

      }

      What we did here is to add REPLY-TO function which is missing in 1.5 (but is present in 2.0) and allows us to set different reply-to addresses than FROM address.

    • Finally find this line:

      $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->from . '>' . $this->newline;

      and change it to:

      $header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->replyto) . '?=' . ' <' . $this->replyto . '>' . $this->newline;

      Here we are correcting the way reply-to address is set (it will use the email address your client introduced in the contact form).

      And that’s it!

    Opencart 2.0 fix

    It is simplier to change in the newest version of OC because there is already a funciton to set Reply-To address.

    • First edit the file catalog/controller/information/contact.php

      Look for line:

      $mail->setFrom($this->request->post['email']);

      in my version it is line 20

      Change it to:

      $mail->setFrom($this->config->get('config_email'));

      What this will do is set the FROM field to be the same as your shop’s main email address.

      You can hardcode (but I wouldn’t recommend it) an email adress here if you want by changing this line to ie:

      $mail->setFrom('moc.niamodym@pohs');

    • Now find this line:

      $mail->setSender($this->request->post['name']);

      It should be below the line we just edited or somwhere around.

      Change it to:

      $mail->setReplyTo($this->request->post['email']);

      $mail->setSender($this->config->get('config_email'));

      What this will do is set your client’s email provided by him in the contact form as reply-to email, so that you’re able to respond automatically to contact form messages by clicking on Reply button.

      It is also setting your shop email address as sender’s name.

    • No we need to edit system/library/mail.php file

      You just need to change one line:

      $header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->replyto) . '?=' . ' <' . $this->from . '>' . $this->newline;

      change it to:

      $header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->replyto) . '?=' . ' <' . $this->replyto . '>' . $this->newline;

      Here we are correcting the way reply-to address is set (it will use the email address your client introduced in the contact form).

      Refresh your contact form and try sending a test email.

  2. 755 на папки, 644 на файлы. Конфиги я вообще 400 ставлю.

    Если доступ дать на файлы с папками юзеру от которого вэб-сервер запущен, то и менять права не надо будет, хотя на большинстве хостингов так и есть.

    Из защиты админки, запаролить ее через .htaccess, можно еще и переименовать. Есть файрволы еще на php, можно и им обезопаситься :-)

    + поставить мод который будет следить за изменениями файлов, сразу видно будет если кто заразит. Ну и сайты на джумле и вордпрессе рядом не держать, а то ломают часто.

    А с недавних пор я еще и ip выделенный стал заказывать, тоже защита, например, от ростелекома, который из-за соседей может нормальный сайт в блок запихать

    Подскажите, права 755 на все каталоги ставить? Права 644 на все файлы? Каким образом максимально быстро проделать данные процедуры?

  3. Ребята у меня похожая проблема:

     

    2015-01-11 0:09:40 - PHP Notice:  Error: RCPT TO not accepted from server! in /share/CACHEDEV1_DATA/.qpkg/OpenCart/web/system/library/mail.php on line 308

     

    Только разница в том, что письма ходят, а проблема возникает при попытке написать обращение во вкладке связаться с нами. Как проблему решать ума не дам, прошу помочь.

  4. Добрый день!

     

    Ищу модуль - конфигуратор комплектов товаров. От модуля хочу следующего - возможность добавления и удаления товаров, а так же изменения их количества в существующем комплекте. Т.е существует в товарах уже собранные компьютер из комплектующих фигурирующих в каталоге. Необходимо предоставить возможность покупателю выбрать данные компьютер и пересобрать его из комплектующих разных категорий с возможностью последующей его покупки. Есть ли такие модули или может кто может взяться за подобную работу.  

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.