How to Handle OpenCart 2.0.2.0 SMTP Configuration Problems

Updated on Nov 1, 2022

The OpenCart 2.0.2.0 release introduces a large number of improvements and bug fixes. However, we have also noticed that there are a lot of clients complaining about issues with their mail service when configured with SMTP. In this post, we will present to you the nature of this issue, as well as how to address it.

This post includes:

The Issue - SMTP Configured Emails are not Sent Out

The problem with the OpenCart 2.0.2.0 release is that many clients are having trouble using SMTP for their website mail service. The emails are not delivered, and the OpenCart error log contains the following warnings:

Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in /opencart-path/system/library/mail.php on line 168
fsockopen(): unable to connect to :465 (php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known) in /opencart-path/system/library/mail.php on line 168Notice: Error: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known (0) in /opencart-path/system/library/mail.php on line 171

or

PHP Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /opencart-path/system/library/mail.php on line 168
PHP Warning: fsockopen(): unable to connect to :25 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /opencart-path/system/library/mail.php on line 168

Reason for the SMTP Configuration Issue

The problem is unrelated to the hosting environment, and if the SMTP configuration was previously working, it simply indicates a problem with the OpenCart 2.0.2.0 patch.

The warnings were traced back to an issue with the OpenCart 2.0.2.0 upgrade package. The config mail SMTP host variable appears to have been changed to config_mail_smtp_hostname. However, in some cases, the old name is not replaced with the new one. That is why the SMTP configuration for OpenCart's mail service does not function properly.

Solution for the SMTP Configuration Issue

When it comes to addressing the SMTP configuration issue, you have two options:

  • Automated solution. OpenCart released Free SMTP Fix for OpenCart 2.0.2.0 SMTP configuration issue. Follow the instructions on the website, and you should be covered.
  • Manual solution. In this case, you need to manually replace all instances where the old config_mail_smtp_host is used and change it to config_mail_smtp_hostname. This will fix the issue completely for you and allow you to use the mail service of OpenCart with SMTP.

If you are an existing FastComet client, we will gladly perform the change for you. Simply access your Client Area and open a new support ticket to our team. We are available 24/7 at your service, so we will assist in resolving that, so you can have a trouble-free experience while using OpenCart

We hope you find this article useful. Discover more about FastCloud - the top-rated Hosting Solutions for personal and small business websites in four consecutive years by the HostAdvice Community!

OpenCart Hosting

  • Free Installation
  • 24/7 OpenCart Support
  • Free Domain Transfer
  • Hack-free Protection
  • Fast SSD Storage
  • Free OpenCart Themes
  • Free OpenCart Transfer
  • Free CloudFlare CDN
View More