Page 1 of 1
Notice: Error: DATA not accepted from server (SMTP PROBLEM)
Posted: Thu Nov 10, 2011 7:02 pm
by ciprianrpp
Hello.
I'll be brief.
My spec: Windows 7 64bits with xampp 1.7.7(Apache 2.2.21, MySQL 5.5.16, PHP 5.3.8 )
-OC 1.5.1.3 version has a problem with smtp
Code: Select all
Notice: Error: DATA not accepted from server! in C:\xampp\htdocs\private\system\library\mail.php on line 388
This error message appears in all email requests(contact, aprove account, order, etc). It has something to do with encoding I guess.
Line 388:
Code: Select all
if (substr($reply, 0, 3) != 250) {
trigger_error('Error: DATA not accepted from server!');
exit();
}
Please help!
PS: I've tried with all email providers and same error occurs(gmail,yahoo, local mail sever, hmailserver,postfix etc etc)
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Thu Nov 10, 2011 7:39 pm
by i2Paq
Are you running a local smtp server?
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Thu Nov 10, 2011 8:35 pm
by ciprianrpp
i2Paq wrote:Are you running a local smtp server?
hello.
I've specified in my post that I've tried all different smtp providers including
"local mail server"
the problem is with the new php 5.3.8 version (xampp 1.7.7) (it is something from the opencart coding not compatible with php 5.3.8 )
on php 5.3.1 (xampp 1.7.3) works great
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Thu Nov 10, 2011 10:31 pm
by ciprianrpp
after disabling these 2 lines, the mail arrives but EMPTY(from, to,replyto,subject, mail body etc, all empty)
Code: Select all
$message = str_replace("\r\n", "\n", $header . $message);
$message = str_replace("\r", "\n", $message);
I have used the default OC 1.5.1.3 with the contact form
this are the only lines from header of email:
Code: Select all
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Fri Nov 11, 2011 1:32 am
by i2Paq
You disabled the header and body of the message, no wonder it is empty.
It could be a security setup that prevent your "server" from sending emails with a header and body.
It could be seen as "spam".
Why not setup on a real server at a hoster and not the setup at home you have now?
btw. this is NOT and OpenCart issue you are having.
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Fri Nov 11, 2011 8:54 pm
by ciprianrpp
dear sir,
please read all my post with attention because you didn't read the important parts.
i'll quote and bold the text that you did not read.
i2Paq wrote:Are you running a local smtp server?
hello.
I've specified in my post that I've tried all different smtp providers including
"local mail server"
the problem is with the new php 5.3.8 version (xampp 1.7.7) (it is something from the opencart coding not compatible with php 5.3.8 )
on php 5.3.1 (xampp 1.7.3) works great
LE:
tested now on live dedicated hosting with php 5.3.8 . SAME PROBLEM!!
switched to another shared hosting with php 5.3.2 and there is no problem!
My conclusion: that OC mail class is NOT compatible with php 5.3.8 (latest) and it has something to do with UTF8
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Sat Nov 12, 2011 12:06 am
by ciprianrpp
SOLVED
the OC 1.5.1.3 mail.php file (located in system/library/):
Code: Select all
$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline;
the fix is to add another \n to separate header, so the correct code is:
Code: Select all
$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
cheers
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Thu Dec 01, 2011 11:14 am
by SelfMan
Hi, as I wrote here
http://forum.opencart.com/viewtopic.php ... 24#p225424, the error might be cause by something completelly different.
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Tue Jan 03, 2012 2:14 pm
by robinhood1995
ciprianrpp wrote:SOLVED
the OC 1.5.1.3 mail.php file (located in system/library/):
Code: Select all
$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline;
the fix is to add another \n to separate header, so the correct code is:
Code: Select all
$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
cheers
hi,
thanks for this fix as exchange 2010 does need the following:
354 Start mail input; end with <CRLF>.<CRLF>
Bit I still get the line 388 error, any ideas as my Exchange is setup to relay internally.
thanks
Steve
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Tue Jan 10, 2012 10:17 am
by SelfMan
Check the smtp log on your Exchange server. It might bring more light in to the problem.
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Mon Feb 27, 2012 11:24 am
by jhough76
I just wanted to say thank you. I encountered the same issue and added the newline as instructed. It worked like a charm!!!
Thanks again
Jack
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Fri Jul 27, 2012 7:03 pm
by leveltgp
Hello everyone I have the same problem ,i put the new code in mail.php , the contact form works fine but from orders , new accounts it does not send any email. php version 5.2.17 opencart 1.5.3.1 please any idea?
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Mon May 27, 2013 3:32 pm
by robinhood1995
robinhood1995 wrote:
hi,
thanks for this fix as exchange 2010 does need the following:
354 Start mail input; end with <CRLF>.<CRLF>
Bit I still get the line 388 error, any ideas as my Exchange is setup to relay internally.
thanks
Steve
I have found the work around for exchange which does not even require any mail.php modifications.
Exchange 2010 checks for the dot "." at the end of the message and the way around it is to disable the content filtering under the anti-spam in the hub transport.
hope this helps....
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Wed Nov 19, 2014 12:17 am
by Daniel Ribeiro
So, I had this problem in my store hosted in Dreamhost.
They suddenly changed the way SMTP servers handle messages. Now they don't accept mail sent from addresses not hosted in they servers, so an user with an e-mail @hotmail.com cannot send e-mail using DreamHost servers.
The mail.php class use the e-mail from contacter in the "FROM" field of the E-mail, so Dreamhost now are regecting theses e-mails.
The solution is change the FROM field to the username of the SMTP autentication. In Dreamhost, the username of SMTP auth is the e-mail itself.
So, all I did was replace this (in Line 93):
Code: Select all
$header .= 'From: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->sender. '>' . $this->newline;
to this:
Code: Select all
$header .= 'From: ' . '=?UTF-8?B?' . base64_encode($this->username) . '?=' . '<' . $this->username . '>' . $this->newline;
Hope this helps.
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Wed Jul 06, 2016 4:21 am
by Roz
Daniel Ribeiro wrote:So, I had this problem in my store hosted in Dreamhost.
They suddenly changed the way SMTP servers handle messages. Now they don't accept mail sent from addresses not hosted in they servers, so an user with an e-mail @hotmail.com cannot send e-mail using DreamHost servers.
Hope this helps.
Yes, It's helps me with SPARKPOST. Sparkpost not sending email where FROM was not from registered domain in they system.
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Fri Jan 27, 2017 12:52 pm
by wsrpint
By changing SMTP Timeout to 60 seconds, I was able to resolve this issue. Obviously that's too long, but your server's negotiation with Gmail is taking longer than expected.
When you encounter that issue, it is because the server hasn't received a reply before the timeout period.
Re: Notice: Error: DATA not accepted from server (SMTP PROB
Posted: Mon Feb 25, 2019 12:39 am
by mohammedrauff
wsrpint wrote: ↑Fri Jan 27, 2017 12:52 pm
By changing SMTP Timeout to 60 seconds, I was able to resolve this issue. Obviously that's too long, but your server's negotiation with Gmail is taking longer than expected.
When you encounter that issue, it is because the server hasn't received a reply before the timeout period.
This is the best answer and it works like charm Thank You very much