For those who are awake!
Discount -15%
We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
New design
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

2.13.4.1.7. RCPT error TO not accepted from server

Error "RCPT TO not accepted from server»In OpenCart most often occurs when a site tries to send a letter with an incorrect sender address. Default OpenCart in header from uses the mailbox of the store, which is why this problem arises.

Attention! Error "RCPT TO not accepted from server"Is given by the scripts of OpenCart itself and most often has nothing to do with the recipient's address, since it is returned when processing the sender's address.

There are several ways to solve this problem:

To change your store mailbox, do the following:

  1. Go to the section "System → Settings» («System → Settings»):
  2. To the right of the store name, click “Edit» («Edit»):
  3. Switch to the "Score» («Store") (In some versions, you may need to go to the section"Themain» («Main»)):
  4. In field "E-Mail»Specify the mailbox to which you want to receive letters and which will be specified in the SMTP connection settings (additional mailboxes can be specified later):

To fix the work of sending emails, edit some lines in the file system/library/mail/smtp.php, namely:

  • On line 27, find this code:
    $header .= 'From: =?UTF-8?B?' . base64_encode($this->from) . '?= <' . $this->from. '>' . PHP_EOL;

    And replace it with this:

    $header .= 'From: =?UTF-8?B?' . base64_encode($this->smtp_username) . '?= <' . $this->smtp_username . '>' . PHP_EOL;
  • On line 27, find this code:
    fputs($handle, 'MAIL FROM: <' . $this->from . '>XVERP' . "\r\n");

    And replace it with this:

    fputs($handle, 'MAIL FROM: <' . $this->smtp_username . '>XVERP' . "\r\n");
  • On line 27, find this code:
    fputs($handle, 'MAIL FROM: <' . $this->from. '>' . "\r\n");

    And replace it with this:

    fputs($handle, 'MAIL FROM: <' . $this->smtp_username . '>' . "\r\n");

After the changes, check the sending of letters. Please note that the mailbox to which you are connecting via SMTP will be specified as the sender. It should also be understood that when updating or installing some extensions, you may need to re-make the changes.