Must be caused by an installed extension. Remove them one-by-one until the error goes away.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
It seems the issue is related to your language file.
This is the code:
Code: Select all
$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
catalog\language\{your language folder}\information\contact.php
You should have something like this:
Code: Select all
$_['email_subject'] = 'Enquiry %s';
I try your way, and this time the error change for this:DigitCart wrote: ↑Mon Oct 25, 2021 6:21 pmHi
It seems the issue is related to your language file.
This is the code:Check this file:Code: Select all
$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
catalog\language\{your language folder}\information\contact.php
You should have something like this:%s should be there.Code: Select all
$_['email_subject'] = 'Enquiry %s';
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in public_html/system/library/mail/smtp.php on line 88
Well, that's an issue now with your wrong SMTP settings in OpenCart's admin setings.Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in public_html/system/library/mail/smtp.php on line 88
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
I was set up Gmail SMTP.
But still not working.
Mail Engine : SMTP
SMTP Hostname : smtp.gmail.com
SMTP Username: MY EMAIL
SMTP Password : APP Password
SMTP Port: 465 (465=SSL // 587=TLS // 25=standard)
the port all try it.
The last option of your mail form settings in your OC admin > systems > settings > edit settings > mail tab has not been provided. In the meantime, for gmail, using port 465, the hostname should be: ssl://smtp.gmail.com . For port 587, it should be: tls://smtp.gmail.com . However, I would rather recommend the port 465 solution.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I know but no matter how I change the setting of the port. even I try to use a different hostname with a relevant port. still not working.straightlight wrote: ↑Thu Oct 28, 2021 7:39 pmThe last option of your mail form settings in your OC admin > systems > settings > edit settings > mail tab has not been provided. In the meantime, for gmail, using port 465, the hostname should be: ssl://smtp.gmail.com . For port 587, it should be: tls://smtp.gmail.com . However, I would rather recommend the port 465 solution.
Then you're not changing it right. See your cPanel's Email settings for your email account (with SSL option) on what should be the right parameter to be used. Alternatively, you could either contact your host or create a new service request in the Commercial Support section of the forum, or contact me directly via the forum PM, to have this issue investigated as a custom job.mfmcb wrote: ↑Thu Oct 28, 2021 11:09 pmI know but no matter how I change the setting of the port. even I try to use a different hostname with a relevant port. still not working.straightlight wrote: ↑Thu Oct 28, 2021 7:39 pmThe last option of your mail form settings in your OC admin > systems > settings > edit settings > mail tab has not been provided. In the meantime, for gmail, using port 465, the hostname should be: ssl://smtp.gmail.com . For port 587, it should be: tls://smtp.gmail.com . However, I would rather recommend the port 465 solution.
In the meantime, please post a screenshot of your OC email form settings (without password) and post your latest PHP error logs about the latest changes you tried.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
OK, I have uploaded to ATTACHstraightlight wrote: ↑Thu Oct 28, 2021 11:11 pmThen you're not changing it right. See your cPanel's Email settings for your email account (with SSL option) on what should be the right parameter to be used. Alternatively, you could either contact your host or create a new service request in the Commercial Support section of the forum, or contact me directly via the forum PM, to have this issue investigated as a custom job.mfmcb wrote: ↑Thu Oct 28, 2021 11:09 pmI know but no matter how I change the setting of the port. even I try to use a different hostname with a relevant port. still not working.straightlight wrote: ↑Thu Oct 28, 2021 7:39 pm
The last option of your mail form settings in your OC admin > systems > settings > edit settings > mail tab has not been provided. In the meantime, for gmail, using port 465, the hostname should be: ssl://smtp.gmail.com . For port 587, it should be: tls://smtp.gmail.com . However, I would rather recommend the port 465 solution.
In the meantime, please post a screenshot of your OC email form settings (without password) and post your latest PHP error logs about the latest changes you tried.
Attachments
screenshot-cpanel.368ight.com-2021.10.29-00_20_01.png (13.14 KiB) Viewed 1408 times
screenshot-368ight.com-2021.10.29-00_17_45.png (37.61 KiB) Viewed 1408 times
The first screenshot you sent are not the PHP error logs. That's the PHP version. Please look in your file manager / FTP for the error_log file in your opencart root folder or in the admin. If you can't find this file, and using cPanel, look in your log folder for your SSL .tar or .tar.gz . If you don't use cPanel, contact your host to provide those logs.mfmcb wrote: ↑Fri Oct 29, 2021 12:21 amOK, I have uploaded to ATTACHstraightlight wrote: ↑Thu Oct 28, 2021 11:11 pmThen you're not changing it right. See your cPanel's Email settings for your email account (with SSL option) on what should be the right parameter to be used. Alternatively, you could either contact your host or create a new service request in the Commercial Support section of the forum, or contact me directly via the forum PM, to have this issue investigated as a custom job.
In the meantime, please post a screenshot of your OC email form settings (without password) and post your latest PHP error logs about the latest changes you tried.
Alternatively, you could look in your OC admin > systems > maintenance > error logs or in your storage/logs folder on your file server for the latest entries about your email settings.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
OK this is in admin> systems> maintenance> error logs show:straightlight wrote: ↑Fri Oct 29, 2021 12:27 ammfmcb wrote: ↑Fri Oct 29, 2021 12:21 amOK, I have uploaded to ATTACHstraightlight wrote: ↑Thu Oct 28, 2021 11:11 pm
Then you're not changing it right. See your cPanel's Email settings for your email account (with SSL option) on what should be the right parameter to be used. Alternatively, you could either contact your host or create a new service request in the Commercial Support section of the forum, or contact me directly via the forum PM, to have this issue investigated as a custom job.
In the meantime, please post a screenshot of your OC email form settings (without password) and post your latest PHP error logs about the latest changes you tried.
The first screenshot you sent are not the PHP error logs. That's the PHP version. Please look in your file manager / FTP for the error_log file in your opencart root folder or in the admin. If you can't find this file, and using cPanel, look in your log folder for your SSL .tar or .tar.gz . If you don't use cPanel, contact your host to provide those logs.
Alternatively, you could look in your OC admin > systems > maintenance > error logs or in your storage/logs folder on your file server for the latest entries about your email settings.
2021-10-28 16:16:44 - PHP Warning: fsockopen(): Peer certificate CN=`ns77.hostingspeed.net' did not match expected CN=`smtp.gmail.com' in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:16:44 - PHP Warning: fsockopen(): Failed to enable crypto in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:16:44 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:17:23 - PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:17:23 - PHP Warning: fsockopen(): Failed to enable crypto in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:17:23 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:587 (Unknown error) in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:26:48 - PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:26:48 - PHP Warning: fsockopen(): Failed to enable crypto in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:26:48 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:587 (Unknown error) in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
Then, there you go. Contact your host to resolve this issue.mfmcb wrote: ↑Fri Oct 29, 2021 1:41 amOK this is in admin> systems> maintenance> error logs show:straightlight wrote: ↑Fri Oct 29, 2021 12:27 am
The first screenshot you sent are not the PHP error logs. That's the PHP version. Please look in your file manager / FTP for the error_log file in your opencart root folder or in the admin. If you can't find this file, and using cPanel, look in your log folder for your SSL .tar or .tar.gz . If you don't use cPanel, contact your host to provide those logs.
Alternatively, you could look in your OC admin > systems > maintenance > error logs or in your storage/logs folder on your file server for the latest entries about your email settings.
2021-10-28 16:16:44 - PHP Warning: fsockopen(): Peer certificate CN=`ns77.hostingspeed.net' did not match expected CN=`smtp.gmail.com' in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:16:44 - PHP Warning: fsockopen(): Failed to enable crypto in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:16:44 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:17:23 - PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:17:23 - PHP Warning: fsockopen(): Failed to enable crypto in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:17:23 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:587 (Unknown error) in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:26:48 - PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:26:48 - PHP Warning: fsockopen(): Failed to enable crypto in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:26:48 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:587 (Unknown error) in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I contacted the service provider and they pointed out that the problem was caused by SMTP.PHP and I needed to troubleshoot it myself.straightlight wrote: ↑Fri Oct 29, 2021 2:05 amThen, there you go. Contact your host to resolve this issue.mfmcb wrote: ↑Fri Oct 29, 2021 1:41 amOK this is in admin> systems> maintenance> error logs show:straightlight wrote: ↑Fri Oct 29, 2021 12:27 am
The first screenshot you sent are not the PHP error logs. That's the PHP version. Please look in your file manager / FTP for the error_log file in your opencart root folder or in the admin. If you can't find this file, and using cPanel, look in your log folder for your SSL .tar or .tar.gz . If you don't use cPanel, contact your host to provide those logs.
Alternatively, you could look in your OC admin > systems > maintenance > error logs or in your storage/logs folder on your file server for the latest entries about your email settings.
2021-10-28 16:16:44 - PHP Warning: fsockopen(): Peer certificate CN=`ns77.hostingspeed.net' did not match expected CN=`smtp.gmail.com' in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:16:44 - PHP Warning: fsockopen(): Failed to enable crypto in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:16:44 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:17:23 - PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:17:23 - PHP Warning: fsockopen(): Failed to enable crypto in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:17:23 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:587 (Unknown error) in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:26:48 - PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:26:48 - PHP Warning: fsockopen(): Failed to enable crypto in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:26:48 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:587 (Unknown error) in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
I check SMTP.PHP, I wonder if the following code is correct?
<?php
namespace Mail;
class Smtp {
public $smtp_hostname ;
public $smtp_username ;
public $smtp_password ;
public $smtp_port = 25;
public $smtp_timeout = 5;
public $max_attempts = 3;
public $verp = false;
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Forget it, it seems that it cannot be solved, because the server indicates that the related settings are normal. Looking at the error log, it means that there is a problem with smtp.php.
But if it is correct, then this problem may not be solved
The first one smtp.gmail.com it tried to open a secure connection to smtp.gmail.com, but the reply was from ns77.hostingspeed.net. This could indicate your host is rerouting connections to port 465.
The second set of errors were caused by using ssl:// on port 587, which won't work. You need to use ssl:// on port 465 or tls:// on port 587. You can't mix them.
It's not an issue with the SMTP library, It's simply because you haven't sent them the full error message or you may have sent them the full error message but they simply didn't understand where they need to install the crypto server library to solve the issue. Sometimes, when the issue is not caused by a user error, then tech. support simply needs to focus on these logs. Right now, as said above, it is related to a certificate issue where the best option would be for your host to fix this. Once both issues resolved, try again with your SMTP ports.mfmcb wrote: ↑Wed Nov 03, 2021 12:10 amI contacted the service provider and they pointed out that the problem was caused by SMTP.PHP and I needed to troubleshoot it myself.straightlight wrote: ↑Fri Oct 29, 2021 2:05 amThen, there you go. Contact your host to resolve this issue.mfmcb wrote: ↑Fri Oct 29, 2021 1:41 am
OK this is in admin> systems> maintenance> error logs show:
2021-10-28 16:16:44 - PHP Warning: fsockopen(): Peer certificate CN=`ns77.hostingspeed.net' did not match expected CN=`smtp.gmail.com' in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:16:44 - PHP Warning: fsockopen(): Failed to enable crypto in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:16:44 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:17:23 - PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:17:23 - PHP Warning: fsockopen(): Failed to enable crypto in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:17:23 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:587 (Unknown error) in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:26:48 - PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:26:48 - PHP Warning: fsockopen(): Failed to enable crypto in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
2021-10-28 16:26:48 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:587 (Unknown error) in /home/d68itcom/public_html/system/library/mail/smtp.php on line 88
I check SMTP.PHP, I wonder if the following code is correct?
<?php
namespace Mail;
class Smtp {
public $smtp_hostname ;
public $smtp_username ;
public $smtp_password ;
public $smtp_port = 25;
public $smtp_timeout = 5;
public $max_attempts = 3;
public $verp = false;
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: niagato, Semrush [Bot] and 644 guests