Post by ciprianrpp » Thu Nov 10, 2011 7:02 pm

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)

...some things are never ment to be...


User avatar
New member

Posts

Joined
Tue May 10, 2011 5:25 pm
Location - Bucuresti

Post by i2Paq » Thu Nov 10, 2011 7:39 pm

Are you running a local smtp server?

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by ciprianrpp » Thu Nov 10, 2011 8:35 pm

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

...some things are never ment to be...


User avatar
New member

Posts

Joined
Tue May 10, 2011 5:25 pm
Location - Bucuresti

Post by ciprianrpp » Thu Nov 10, 2011 10:31 pm

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

...some things are never ment to be...


User avatar
New member

Posts

Joined
Tue May 10, 2011 5:25 pm
Location - Bucuresti

Post by i2Paq » Fri Nov 11, 2011 1:32 am

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.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by ciprianrpp » Fri Nov 11, 2011 8:54 pm

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 grea
t

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

...some things are never ment to be...


User avatar
New member

Posts

Joined
Tue May 10, 2011 5:25 pm
Location - Bucuresti

Post by ciprianrpp » Sat Nov 12, 2011 12:06 am

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

...some things are never ment to be...


User avatar
New member

Posts

Joined
Tue May 10, 2011 5:25 pm
Location - Bucuresti

Post by SelfMan » Thu Dec 01, 2011 11:14 am

Hi, as I wrote here http://forum.opencart.com/viewtopic.php ... 24#p225424, the error might be cause by something completelly different.

New member

Posts

Joined
Thu Dec 01, 2011 8:01 am

Post by robinhood1995 » Tue Jan 03, 2012 2:14 pm

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

Newbie

Posts

Joined
Sat Dec 31, 2011 8:02 am

Post by SelfMan » Tue Jan 10, 2012 10:17 am

Check the smtp log on your Exchange server. It might bring more light in to the problem.

New member

Posts

Joined
Thu Dec 01, 2011 8:01 am

Post by jhough76 » Mon Feb 27, 2012 11:24 am

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

Newbie

Posts

Joined
Mon Feb 27, 2012 11:23 am

Post by leveltgp » Fri Jul 27, 2012 7:03 pm

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?

Level Technical Group
Web & IT Services
http://www.leveltgp.gr
https://www.levelhosting.net
Επαγγελματικές Υπηρεσίες σχεδίασης και φιλοξενίας Ιστοσελίδων


New member

Posts

Joined
Sat Jul 07, 2012 3:25 am
Location - Athens

Post by robinhood1995 » Mon May 27, 2013 3:32 pm

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....

Newbie

Posts

Joined
Sat Dec 31, 2011 8:02 am

Post by Daniel Ribeiro » Wed Nov 19, 2014 12:17 am

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.


Posts

Joined
Wed Nov 19, 2014 12:11 am

Post by Roz » Wed Jul 06, 2016 4:21 am

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.

Roz
Newbie

Posts

Joined
Wed Jul 06, 2016 4:18 am

Post by wsrpint » 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.

Newbie

Posts

Joined
Fri Jan 27, 2017 12:51 pm

Post by mohammedrauff » Mon Feb 25, 2019 12:39 am

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

Newbie

Posts

Joined
Wed Jan 30, 2019 5:48 pm
Who is online

Users browsing this forum: No registered users and 11 guests