Solution of problem "553 Relaying disallowed","DATA not accepted from server" for OpenCart

Solution of problem "553 Relaying disallowed","DATA not accepted from server" for OpenCart

Hi,
I had a big problem with opencart and zoho mail. When i finaly configured SMTP protocol (using this manual bdw)
Every time opecart tries to sen email to a customer i had an error 553 Relaying disallowed DATA not accepted from server.

This happens because opencart uses your contact mail value for "Mail From" attribute.

You have 2 ways to fix this:
  1. Change contact mail to match a smtp account
    For example if your contact mail is "info@yourdomain.com", and you want the service to send emails about new users etc. from "no-reply@yourdomain.com". You need to change your contact mail to "no-reply@yourdomain.com"
  2. Change system/library/mail.php
Replace this:
  1.  public function setFrom($from) {
  2.                 $this->from = $from;
  3.         }

  4.         public function setSender($sender) {
  5.                 $this->sender = $sender;
  6.         }
To this:
  1.  public function setFrom($username) {
  2.                 $this->from = $this->username;
  3.         }

  4.         public function setSender($username) {
  5.                 $this->sender = $this->username;
  6.         }
ATTENTION: You need to use your full mail as username at smtp configuration.

P.S. Sorry for my bad English. I hope this short manual will help you deal with problem :)