220.127.116.11.7. RCPT error TO not accepted from server
Error "RCPT TO not accepted from server" in OpenCart, it 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 causes a similar problem.
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:
- Go to section "System → Settings" ("System → Settings"):
- To the right of the store name, click "Edit" ("Edit"):
- Switch to tab "Invoice" ("Store") (in some versions, you may need to go to the section "Themain" ("Main")):
- 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
- 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;
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.