Post by zigi00x » Sat Jan 23, 2021 4:59 am

Hello warriors of opencart,

I have a problem with mail, sometimes I get this error:

Code: Select all

2021-01-11 14:45:40 - PHP Warning: fsockopen (): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/******/public_html/system/library/mail/smtp.php on line 87
2021-01-11 14:45:40 - PHP Warning: fsockopen (): unable to connect to smtp. *******. Com: 587 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in / home /pcrobots/public_html/system/library/mail/smtp.php on line 87
the problem occurs when creating an order, sending the status of the order to the customer, creating an account.

an error appears on the web and this in the log.

The error is displayed randomly and max 1-2 times a day, otherwise, everything works normally and emails normally work with the current settings, only occasionally this error is displayed, for example 40 emails in a row will be sent without error.

Anyone have any idea how to debug it?

New member

Posts

Joined
Wed Aug 15, 2018 1:20 am

Post by sw!tch » Sat Jan 23, 2021 5:16 am

Some Webhosts or mail providers implement sending rate limits. Best to contact them or use a service better geared for sending mass mail such as mailgun, sendgrid, etc.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by ADD Creative » Sat Jan 23, 2021 7:56 am

"php_network_getaddresses: getaddrinfo failed" means you server couldn't perform a DNS lookup. Could be a problem with DNS on the server or you are hitting some limit. Check your sever logs or ask your host.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Mon Jan 25, 2021 7:40 pm

zigi00x wrote:
Sat Jan 23, 2021 4:59 am
Hello warriors of opencart,
Haha! And you have my keyboard, Frodo!

zigi00x wrote:
Sat Jan 23, 2021 4:59 am
PHP Warning: fsockopen (): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/******/public_html/system/library/mail/smtp.php on line 87
Looks like one for your web host.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by EvolveWebHosting » Mon Jan 25, 2021 9:51 pm

Before contacting your hosting company, check to make sure your SMTP credentials are entered properly. If you copied and pasted your password into the field, make sure there is no space at the beginning or end of the password. If it's not working after that then contact your hosting companies support department.

Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhost.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by Romaguera » Tue Feb 09, 2021 3:22 pm

sw!tch wrote:
Sat Jan 23, 2021 5:16 am
Some Webhosts or mail providers implement sending rate limits. Best to contact them or use a service better geared for sending mass mail such as mailgun, sendgrid, myaarpmedicare etc.
Thanks for the update and quick reply. I'll be sure to keep an eye on this thread. Looking for the same issue. Bumped into your thread. Thanks for creating it. Looking forward for solution.

Newbie

Posts

Joined
Tue Feb 09, 2021 3:17 pm

Post by zigi00x » Sun Jul 11, 2021 11:46 pm

Hi,

Is it weird that the error is only displayed when it is sent through the opencart platform, other email clients do not generate these errors?

I still haven't been able to fix the error, I haven't really paid much attention to it at the moment, I'll try to fix it as soon as possible and I'll present a solution here.

If someone has already fixed it, you can give me some details on how to do it.

Thanks.

New member

Posts

Joined
Wed Aug 15, 2018 1:20 am

Post by zigi00x » Sun Jul 11, 2021 11:48 pm

EvolveWebHosting wrote:
Mon Jan 25, 2021 9:51 pm
Before contacting your hosting company, check to make sure your SMTP credentials are entered properly. If you copied and pasted your password into the field, make sure there is no space at the beginning or end of the password. If it's not working after that then contact your hosting companies support department.
Yes, everything is set correctly, if not, this error would not occur only occasionally but all the time.

New member

Posts

Joined
Wed Aug 15, 2018 1:20 am

Post by zigi00x » Sun Jul 11, 2021 11:48 pm

paulfeakins wrote:
Mon Jan 25, 2021 7:40 pm
zigi00x wrote:
Sat Jan 23, 2021 4:59 am
Hello warriors of opencart,
Haha! And you have my keyboard, Frodo!

zigi00x wrote:
Sat Jan 23, 2021 4:59 am
PHP Warning: fsockopen (): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/******/public_html/system/library/mail/smtp.php on line 87
Looks like one for your web host.
I contacted support, we'll see what they tell me.

New member

Posts

Joined
Wed Aug 15, 2018 1:20 am

Post by hpwebdesign » Mon Jul 12, 2021 10:20 am

zigi00x wrote:
Sat Jan 23, 2021 4:59 am
Hello warriors of opencart,

I have a problem with mail, sometimes I get this error:

Code: Select all

2021-01-11 14:45:40 - PHP Warning: fsockopen (): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/******/public_html/system/library/mail/smtp.php on line 87
2021-01-11 14:45:40 - PHP Warning: fsockopen (): unable to connect to smtp. *******. Com: 587 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in / home /pcrobots/public_html/system/library/mail/smtp.php on line 87
the problem occurs when creating an order, sending the status of the order to the customer, creating an account.

an error appears on the web and this in the log.

The error is displayed randomly and max 1-2 times a day, otherwise, everything works normally and emails normally work with the current settings, only occasionally this error is displayed, for example 40 emails in a row will be sent without error.

Anyone have any idea how to debug it?
Have you checked that SMTP setting is correct?

Try to test your domain email account. Login with email and password to your webmail.

eg: webmail.yourdomain.com or yourdomain.com:2096

Read more about OpenCart SMTP email setting: https://hpwebdesign.io/email-settings-opencart

Hope this help.

HP Web Design
http://hpwebdesign.io
Opencart Extension Development | OpenCart Professional Services | OpenCart Tutorials


User avatar
New member

Posts

Joined
Wed Aug 15, 2018 6:58 am
Location - Yogyakarta

Post by straightlight » Mon Jul 12, 2021 5:37 pm

The error log state port 587. Try with port 465. Also ask your webhost to install the crypto library on your domain if you don't have access to cPanel WHM or SSH as root for port 587.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by zigi00x » Tue Jul 20, 2021 12:53 am

straightlight wrote:
Mon Jul 12, 2021 5:37 pm
The error log state port 587. Try with port 465. Also ask your webhost to install the crypto library on your domain if you don't have access to cPanel WHM or SSH as root for port 587.
I want to ask, can't it be a php version? does oc support 3.0.2.0 with php version 7.3.17?

New member

Posts

Joined
Wed Aug 15, 2018 1:20 am

Post by ADD Creative » Tue Jul 20, 2021 1:47 am

zigi00x wrote:
Tue Jul 20, 2021 12:53 am
I want to ask, can't it be a php version? does oc support 3.0.2.0 with php version 7.3.17?
The issue is not with your PHP version. The issue is with your server/hosting. If your host can't fix the issue, you could look for a different host.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JNeuhoff » Tue Jul 20, 2021 1:55 am

zigi00x wrote:
Sun Jul 11, 2021 11:48 pm
I contacted support, we'll see what they tell me.

So have you had a response yet from your webhost?

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by aerogel » Tue Jan 04, 2022 5:20 pm

zigi00x wrote:
Sat Jan 23, 2021 4:59 am
Hello warriors of opencart,

I have a problem with mail, sometimes I get this error:

Code: Select all

2021-01-11 14:45:40 - PHP Warning: fsockopen (): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/******/public_html/system/library/mail/smtp.php on line 87
2021-01-11 14:45:40 - PHP Warning: fsockopen (): unable to connect to smtp. *******. Com: 587 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in / home /pcrobots/public_html/system/library/mail/smtp.php on line 87
use the IP address of your host instead. its a problem with dns.
ping "mail.yourdomain.com" and then grab the ip and use it.
that fixed my problem.

New member

Posts

Joined
Thu Jan 04, 2018 8:14 pm
Who is online

Users browsing this forum: grgr, nonnedelectari, paulfeakins and 89 guests