Page 1 of 3

ERROR: EHLO not accepted from server!

Posted: Thu Oct 25, 2012 11:04 am
by greensolef
Hi,
I need your help guyz!

After clicking the button in contact page, I get this this error that says:

Code: Select all

Notice: Error: EHLO not accepted from server! in /home/kraftpap/public_html/system/library/mail.php on line 200
I have already setup the smtp mail settings on the opencart admin:
I have attached the screenshot mail setup.
(http://forum.opencart.com/download/file.php?id=14208)

Please help.

Re: ERROR: EHLO not accepted from server!

Posted: Tue Nov 06, 2012 1:15 am
by matthewkris
I'm having this exact same issue. Has anyone successfully used Google to send mail?

Re: ERROR: EHLO not accepted from server!

Posted: Tue Nov 06, 2012 3:36 am
by rph
You probably don't have a fully qualified domain name (possibly related to SERVER_NAME). Ask your host for help.

Re: ERROR: EHLO not accepted from server!

Posted: Wed Nov 07, 2012 4:07 pm
by nav_vij
I'm facing the same issue guys. Mail is received while i'm using the forgot password option, but getting this error while registering new user. When i use Mail then i don't receive any mails. I'm using smtp now, and its giving me this error.
I'm stuck with this for last couple of days, please help me guys

Re: ERROR: EHLO not accepted from server!

Posted: Thu Nov 08, 2012 1:09 am
by rph
As a possible workaround, edit /system/library/mail.php and change:

Code: Select all

fputs($handle, 'EHLO ' . getenv('SERVER_NAME') . $this->crlf); 
To (assumes server using IPv4):

Code: Select all

fputs($handle, 'EHLO [' . getenv('SERVER_ADDR') . ']' . $this->crlf); 
You should also use phpinfo to find out what your SERVER_NAME and SERVER_ADDR values are (they'll be in the Environment table).

More info on HELO/EHLO standards can be found in RFC 2821 Section 4.1.1.1.

Re: ERROR: EHLO not accepted from server!

Posted: Wed Jan 09, 2013 7:56 pm
by SiriusBlackx
Try This:

Hi,
i have the same problem so i found this answer to my problem:
What port number you have set in SMTP field? Try port 465 if you have default 25 as SMTP port.

In case use gmail account was SMTP:

Mail Protocol: SMTP
Mail Parameters: (blank)
SMTP Host: ssl://smtp.gmail.com
SMTP Username: (yours)
SMTP Password: ****
SMTP Port: 465
SMTP Timeout: 5

SMTP Host: ssl://smtp.gmail.com

The ssl:// before the host makes all the diference.

Re: ERROR: EHLO not accepted from server!

Posted: Mon Feb 11, 2013 8:04 am
by imsir
I want to send email through gmail smtp.

My settings:

smtp: smtp.gmail.com
port: 25

Notice: Error: AUTH LOGIN not accepted from server! in D:\server\Apache2.2\htdocs\amonshop\system\library\mail.php on line 217

When I use ssl smtp:

ssl://smtp.gmail.com
port: 465

Than I get other error:
Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.gmail.com:465 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in D:\server\Apache2.2\htdocs\shop\system\library\mail.php on line 153Notice: Error: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (10) in D:\server\Apache2.2\htdocs\shop\system\library\mail.php on line 156

When I set to "mail" instead of smtp, contact form works, but i don't get any email.

Any advices?

Re: ERROR: EHLO not accepted from server!

Posted: Mon Feb 11, 2013 8:42 am
by imsir
Ok. I tried gmail and hotmail servers. They do not work.

I downloaded argosoft mailserver and setup my localhost mail server and stuff works. What would be the problem for me that gmail or hotmail doesn't work? Am I blacklisted or something? Gmail worked on wordpress like 1 week ago.

Re: ERROR: EHLO not accepted from server!

Posted: Thu Feb 21, 2013 12:39 am
by natedeveloper
I am running into this problem. Just tested SMTP auth from command line. Seems the handshake is not waiting for proper 220 before sending HELO. My server is failing this referencing section 3.1 of RFC 2821.

Re: ERROR: EHLO not accepted from server!

Posted: Thu Feb 21, 2013 1:41 am
by imsir
try your isp's smtp. gmail and hotmail are so unreliable.

Re: ERROR: EHLO not accepted from server!

Posted: Sun Mar 10, 2013 11:33 am
by andersonnarciso
rph wrote:As a possible workaround, edit /system/library/mail.php and change:

Code: Select all

fputs($handle, 'EHLO ' . getenv('SERVER_NAME') . $this->crlf);
To (assumes server using IPv4):

Code: Select all

fputs($handle, 'EHLO [' . getenv('SERVER_ADDR') . ']' . $this->crlf);
You should also use phpinfo to find out what your SERVER_NAME and SERVER_ADDR values are (they'll be in the Environment table).

More info on HELO/EHLO standards can be found in RFC 2821 Section 4.1.1.1.
Thanks man, work for me in page forget password, but for send e-mail of contact page "Notice: Error: MAIL FROM not accepted from server! in /home/storage/f/52/81/shop/public_html/system/library/mail.php on line 298"

Re: ERROR: EHLO not accepted from server!

Posted: Tue Mar 12, 2013 12:19 am
by rph
Probably has to do with the way your host configured things. OpenCart sends enquiry emails out as being "from" the person submitting them even though it's actually from you.

Re: ERROR: EHLO not accepted from server!

Posted: Fri Aug 16, 2013 5:20 pm
by carlpotts
Thanks folks, I also ran into the same problem a bit of tinkering with my SMTP settings resolved the issue for me

Re: ERROR: EHLO not accepted from server!

Posted: Sun Nov 24, 2013 4:59 pm
by itezora
I had the same issue using Justhost, adding ssl:// to my server name fixed it !

Re: ERROR: EHLO not accepted from server!

Posted: Thu Jul 17, 2014 3:32 pm
by jet737
Hello guys,

isn't there any fully functional solution? I didn't have any problem until a few weeks ago and then suddenly this mail server problem has been occured. Exceptional, once or twice I replaced mail.php from my backup and fixed it but now it doesn't work.

I'm using ISP based mail server and there wasn't change any settings on my ISP. All settings are the same since I had setup emails.

I didn't try to change SERVEr_NAME to SERVER_ADDR becouse I don't think so it does work, what could be change about server definition? also doesn't work port value!

I really begin to hate this opencart program! When I think about "oh great everything is fine"...then a problem occurs!
I hope you guys find a solution.

Re: ERROR: EHLO not accepted from server!

Posted: Thu Sep 11, 2014 4:43 pm
by haxcop
HEllo to this issue HELO is very simple if you have a vps.
just add ssl:// before your server name and its done.
ie
smtp
yourserver.hostingprovider.com
should be
ssl://yourserver.hostingprovider.com

lookyourbike.com

Re: ERROR: EHLO not accepted from server!

Posted: Thu Feb 12, 2015 12:57 am
by dwsalter
Here is what finally worked for me ...
Capture.PNG

Capture.PNG (23.09 KiB) Viewed 50845 times


Re: ERROR: EHLO not accepted from server!

Posted: Tue Sep 15, 2015 10:11 pm
by rahilkasimi
Excellent!! This settings worked for me too... Great!

Re: ERROR: EHLO not accepted from server!

Posted: Thu Feb 25, 2016 12:58 am
by civanescu
I confirm that the solution "ssl://mailserver" is working!

Thanks,
K

Re: ERROR: EHLO not accepted from server!

Posted: Tue May 10, 2016 10:46 pm
by afaslan
I confirm that it worked for me too! My configuration is as in the image. My system is in Turkish. But you can guess all parameter meanings. :)

My opencart version is 2.2.0.0