Post by p3nsy » Fri Jan 29, 2016 3:35 am

It all started because I wanted to configure SMTP since it's not working with my google apps for work email or any other email, I called google to see what was going on and they checked everything and said that the SSL in my opencart webpage was not compatible with google's functions and probably many other email companies. I then proceed to get a certificate and install it in my domain wich is in hosting24 and you do all that throgh cPanel. Followed all instructions to activate the certificate and when I go to my front page and try do anything like sending a "contact us" form or sing in, it will show a horrible red X and a red line over the HTTPS in the navigation bar. and I get this Error:

Code: Select all

Notice: Error: DATA not accepted from server! in /home/pensysto/public_html/system/library/mail.php on line 418
I really don't know much about the subject so I just keep on getting desperate and not knowing what to do next, I'd appreciate some help.

My open cart ver. is 2.1.01

Newbie

Posts

Joined
Fri Jan 29, 2016 3:19 am

Post by Dhaupin » Sat Feb 06, 2016 1:11 am

Firstly you should change your account username in the snippet above so people have less of an angle to get in your server (it comes after /home/, change it to something ambiguous/generic)

In that line in question its looking for the first 3 characters of the reply from SMTP and it must be code 250 "Requested mail action okay, completed" else this "DATA not accepted" exception (error) is thrown. So what you can do is (in a test store) in system/library/mail.php here is the spot that errors:

Code: Select all

if (substr($reply, 0, 3) != 250) {
	throw new \Exception('Error: DATA not accepted from server!');
}
Put in some kinda exit before that snippet:

Code: Select all

exit('SMTP expected response 250, received: '. $reply);
Now when you run it and try sending mail OC should exit to a white screen and tell you what reply you are getting back. Its only comparing the first 3 chars of the response, so there should be a number. This may help you deduce why the server is saying NO.

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA

Post by paulfeakins » Wed Mar 02, 2016 6:06 pm

p3nsy wrote:It all started because I wanted to configure SMTP since it's not working with my google apps for work email or any other email
I've had all sorts of problems trying to use Google's SMTP from PHP. For example you probably have to register the app that wants to connect to it and do a CAPTCHA. Even after doing this it often rejects the connection for no apparent reason.

IMO your best bet would be to use a different SMTP service.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Active Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by Daniel » Wed Mar 02, 2016 7:10 pm

if its gmail you need to setup 2 factor auth and set an app password

OpenCart®
Project Owner & Developer.
OpenCart commercial support now available!


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm
Who is online

Users browsing this forum: No registered users and 7 guests