At this moment I have no email contact from the site. The PHP mail has worked intermittently (more fail than success) since installation, but SMTP has never worked. I am confident in my smtp settings and have tried different emails that I have in here without success.
The SMTP server is 123-reg.co.uk who also host the site (shared hosting).
The error I receive is Warning: fsockopen(): unable to connect to smtp.123-reg.co.uk:465 (connection refused) in atvdevelopments.co.uk/system/library/mail/smtp.php on line 87.
Line 87 looks to be a timeout on smtp port.
I've tried:
Ports 25, 465, 587, 993
tls:// before SMTP Hostname
ssl:// before SMTP Hostname
Have searched for similar and not come up with anything new to solve this.
I've since turned off displaying errors, maybe I should return it until this is solve?
Support from the forum is gladly appreciated.
Attachments
email error.JPG (22.68 KiB) Viewed 19650 times
line87.JPG (33.06 KiB) Viewed 19650 times
500.JPG (18.74 KiB) Viewed 19650 times
I don't have many custom extensions installed, just the Square payment ( square.ocmod.zip)
My site is https://www.atvdevelopments.co.uk
The opencart version is 3.0.3.6
Thanks
The connection refused error normally means that the connection is being blocked either on your server (outbound) or on the receiving server (inbound). You will need to ask your host why.
Not sure if its what you mean, but looking on the error log on the root of my site I mainly have either of these errors:
PHP Fatal error: Uncaught Exception: Error: Connection refused (142)
PHP Fatal error: Uncaught Exception: Error: Connection refused (111)
I don't have many custom extensions installed, just the Square payment ( square.ocmod.zip)
My site is https://www.atvdevelopments.co.uk
The opencart version is 3.0.3.6
Thanks
Well there you have itATVDevelopments wrote: ↑Sun Feb 21, 2021 1:47 amNot sure if its what you mean, but looking on the error log on the root of my site I mainly have either of these errors:
PHP Fatal error: Uncaught Exception: Error: Connection refused (142)
PHP Fatal error: Uncaught Exception: Error: Connection refused (111)
your smtp config for connecting to that smtp server is incorrect - either user - password - blocked port - firewall
You say you tried port 587 with tls ?
Try 465 wwith SSL again
Check with you hosting company also about SMTP use from a webserver
[20-Feb-2021 17:58:28 UTC] PHP Fatal error: Uncaught Exception: Error: Connection refused (111) in /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/library/mail/smtp.php:90
Stack trace:
#0 /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/library/mail.php(142): Mail\Smtp->send()
#1 /home/xrhngdmyrbe9/atvdevelopments.co.uk/catalog/controller/information/contact.php(25): Mail->send()
#2 /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/storagejea4uswlxa95/modification/system/engine/action.php(79): ControllerInformationContact->index()
#3 /home/xrhngdmyrbe9/atvdevelopments.co.uk/catalog/controller/startup/router.php(25): Action->execute(Object(Registry))
#4 /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/storagejea4uswlxa95/modification/system/engine/action.php(79): ControllerStartupRouter->index()
#5 /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/engine/router.php(67): Action->execute(Object(Registry))
#6 /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/engine/router.php(56): Router->execute(Object(Action))
#7 /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/f in /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/library/mail/smtp.php on line 90
-------------------------
I don't have many custom extensions installed, just the Square payment ( square.ocmod.zip)
My site is https://www.atvdevelopments.co.uk
The opencart version is 3.0.3.6
Thanks
Posted by xxvirusxx on another thread related.
He spent time looking at a similar issue - so yours could be related to that
viewtopic.php?f=199&t=215487&start=20
Mail Engine: SMTP
Mail Parameters: blank
SMTP Hostname: ssl://mail.your-site.com
SMTP Username: your_username@your-site.com
SMTP Password: email password
SMTP Port: 465
SMTP Timeout: 5
So ssl:// is fully required.
Port 465 (Outgoing server port)
AND double check with your HOST for settings regarding SMTP from websites especially on shared hosting
The smtp server reports it DOES support TLS
this is the error log generated after using those settings. I will look through that link to see if theres anything more I can glean from it.mikeinterserv wrote: ↑Sun Feb 21, 2021 2:05 amTry these settings
Posted by xxvirusxx on another thread related.
He spent time looking at a similar issue - so yours could be related to that
viewtopic.php?f=199&t=215487&start=20
Mail Engine: SMTP
Mail Parameters: blank
SMTP Hostname: ssl://mail.your-site.com
SMTP Username: your_username@your-site.com
SMTP Password: email password
SMTP Port: 465
SMTP Timeout: 5
So ssl:// is fully required.
Port 465 (Outgoing server port)
AND double check with your HOST for settings regarding SMTP from websites especially on shared hosting
The smtp server reports it DOES support TLS
Thanks
------------[20-Feb-2021 18:58:56 UTC] PHP Fatal error: Uncaught Exception: Error: Connection refused (111) in /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/library/mail/smtp.php:90
Stack trace:
#0 /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/library/mail.php(142): Mail\Smtp->send()
#1 /home/xrhngdmyrbe9/atvdevelopments.co.uk/catalog/controller/information/contact.php(25): Mail->send()
#2 /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/storagejea4uswlxa95/modification/system/engine/action.php(79): ControllerInformationContact->index()
#3 /home/xrhngdmyrbe9/atvdevelopments.co.uk/catalog/controller/startup/router.php(25): Action->execute(Object(Registry))
#4 /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/storagejea4uswlxa95/modification/system/engine/action.php(79): ControllerStartupRouter->index()
#5 /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/engine/router.php(67): Action->execute(Object(Registry))
#6 /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/engine/router.php(56): Router->execute(Object(Action))
#7 /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/f in /home/xrhngdmyrbe9/atvdevelopments.co.uk/system/library/mail/smtp.php on line 90
I don't have many custom extensions installed, just the Square payment ( square.ocmod.zip)
My site is https://www.atvdevelopments.co.uk
The opencart version is 3.0.3.6
Thanks
This is a reply I got from 123-reg support.Hi,
Thank you for contacting us!
If you are using Opencart on cPanel to send emails, then I have to let you know that you cannot connect to other remote SMTP servers, be that 123 Reg or from anyone else.
These are the settings that you need to use:
Port: 25 SMTP Authentication: False or none SSL or Secure Connection: None Server or Host: localhost
Also, make sure the email routing is set to remote; you can check this from the cPanel admin → Email → Email routing.
If both the SMTP settings and email routing are set up correctly, please update this ticket so we can investigate further.
Regarding the SPF and DKIM records, these can be added to the domain itself; only MX records can be added via cPanel (if you wish to use cPanel’s email services).
https://www.123-reg.co.uk/support/wp-co ... -guide.pdf
Regards, Elena 123 Reg
Not sure if I understand it well, but is seems maybe that I need to use an email that's configured in the cpanel of my shared hosting??
currently my emails are all configured directly in 123-reg hosting.
Hmmm
---------------------
I don't have many custom extensions installed, just the Square payment ( square.ocmod.zip)
My site is https://www.atvdevelopments.co.uk
The opencart version is 3.0.3.6
Thanks
They are suggesting your use.ATVDevelopments wrote: ↑Sun Feb 21, 2021 3:18 amThis is a reply I got from 123-reg support.
Not sure if I understand it well, but is seems maybe that I need to use an email that's configured in the cpanel of my shared hosting??
currently my emails are all configured directly in 123-reg hosting.
Hmmm
---------------------
SMTP Hostname: localhost
(with no ssl:// or tls://)
SMTP Port: 25
This is because they block all outgoing mail connections.
Is it me is is this saying you CANNOT CONNECTATVDevelopments wrote: ↑Sun Feb 21, 2021 3:18 am
If you are using Opencart on cPanel to send emails, then I have to let you know that you cannot connect to other remote SMTP servers, be that 123 Reg or from anyone else.
These are the settings that you need to use:
Port: 25 SMTP Authentication: False or none SSL or Secure Connection: None Server or Host: localhost
BUT then telling you the settings you need to use.
What to NOT connect

So your NOT sending through 123 reg servers but smtp on the machine itself but your on shared hosting
do they think you have a VPS or something - something is not right with their answer
So you definitely do NOT have SSL or TLS available to you
Not saying it won't work but something seems off
They carried out the migration themselves, it was seamless for me, but it's only recently I learned that I had the cPanel, as I paid no attention. I used to use ftp.
I have an email service in the cpanel which also has a forwarder. I'm wondering if I can receive email here and forward it using email in the cpanel?
------------------
I don't have many custom extensions installed, just the Square payment ( square.ocmod.zip)
My site is https://www.atvdevelopments.co.uk
The opencart version is 3.0.3.6
Thanks
Have you tried the settings in cpanel and opencart yet for port 25 and host:localhost
cPanel admin → Email → Email routing
with a valid mailbox username and password that MUST exist on the same system.
This is the kind of thing that was in my head, but my current knowledge isn't sufficient for me to crack on and do it.mikeinterserv wrote: ↑Sun Feb 21, 2021 3:55 amIt looks like they have setup shared hosting to route through their smtp servers but only using port 25
Have you tried the settings in cpanel and opencart yet for port 25 and host:localhost
cPanel admin → Email → Email routing
with a valid mailbox username and password that MUST exist on the same system.
I've just been perusing around on the cPanel and I have a mail client in there which has been collecting mails sent when I attempted to send using the PHP mail.
Here is one attached as an image
Attachments
mailfail.JPG (80.26 KiB) Viewed 19244 times
I don't have many custom extensions installed, just the Square payment ( square.ocmod.zip)
My site is https://www.atvdevelopments.co.uk
The opencart version is 3.0.3.6
Thanks
I really don't know. It's not in my configuration.mikeinterserv wrote: ↑Sun Feb 21, 2021 4:17 amwhere is that reply to address coming from
from and reply to generally want to be the same
The migration to the shared hosting introduced the 'xrhngdmybe9' to my life and it seems that I have an email using this.
I just received another bounce back from my test using the PHP mail. (SMTP doesn't succeed to execute and causes a blank paged error)
If I can get any mail to work I'll take that.
heres the bounced back email from my test at 20:30
Attachments
failmail2.JPG (73.85 KiB) Viewed 19103 times
I don't have many custom extensions installed, just the Square payment ( square.ocmod.zip)
My site is https://www.atvdevelopments.co.uk
The opencart version is 3.0.3.6
Thanks
FYI - xrhngdmybe9 is your cpanel account user name, so its just referencing your cpanel account.ATVDevelopments wrote: ↑Sun Feb 21, 2021 4:45 amThe migration to the shared hosting introduced the 'xrhngdmybe9' to my life and it seems that I have an email using this.
Contact your host they are best to resolve this.
Backup and learn how to recover before you make any changes!
cPanel admin > Email > Email routing
and you still have the reply to DIFFERENT from the from
Where is that reply to coming from -
What email have you set as the OC admin shop email is it shop@ OR sweep@
And try sending mail to another email not itself
Thanks for help on this so far. I got some guidance from 123-reg as below, but not sure if I can implement it.
From what I understand I need to use SMTP, but:Hello Derek!
I am really sorry to hear that you are still facing issues.
The Email Routing settings in cPanel need to be set as Remote instead of the default Local, if you are not using a cPanel - created email address.
As the MX (email settings) are set to 123-reg, please make sure that you use a 123-reg email address and that the Email Routing is set to Remote.
You can use Local at Email Routing settings if you wish to use the cPanel created email address, however, for that email to function, you need to set cPanel MX settings - this will cause all the 123-reg created mailboxes to stop working, as you can not use 2 email services on the same domain name.
From the error message provided, you can see that the SMTP password was not accepted by the server. This is normal as it is not possible to authenticate via SMTP on this server.
Please make sure that you turn this to OFF and use the exact settings here:
Port: 25
SMTP Authentication: False or none
SSL or Secure Connection: None
Server or Host: localhost
Kind Regards,
Gabriel 123 Reg
1) set authentication to false/none
2) set no SSL or secure connection
For a typical setup I know how to do this, however the SMTP settings in Opencart are not comprehensive.
Given the information from 123-reg, does anyone know how/if it can be configured?
Regards
I don't have many custom extensions installed, just the Square payment ( square.ocmod.zip)
My site is https://www.atvdevelopments.co.uk
The opencart version is 3.0.3.6
Thanks
Try these settings.ATVDevelopments wrote: ↑Wed Feb 24, 2021 5:55 pmMikeinterserv, I understand what you are saying here and will double check, but I've tried numerous emails. Thank you.
Thanks for help on this so far. I got some guidance from 123-reg as below, but not sure if I can implement it.
From what I understand I need to use SMTP, but:Hello Derek!
I am really sorry to hear that you are still facing issues.
The Email Routing settings in cPanel need to be set as Remote instead of the default Local, if you are not using a cPanel - created email address.
As the MX (email settings) are set to 123-reg, please make sure that you use a 123-reg email address and that the Email Routing is set to Remote.
You can use Local at Email Routing settings if you wish to use the cPanel created email address, however, for that email to function, you need to set cPanel MX settings - this will cause all the 123-reg created mailboxes to stop working, as you can not use 2 email services on the same domain name.
From the error message provided, you can see that the SMTP password was not accepted by the server. This is normal as it is not possible to authenticate via SMTP on this server.
Please make sure that you turn this to OFF and use the exact settings here:
Port: 25
SMTP Authentication: False or none
SSL or Secure Connection: None
Server or Host: localhost
Kind Regards,
Gabriel 123 Reg
1) set authentication to false/none
2) set no SSL or secure connection
For a typical setup I know how to do this, however the SMTP settings in Opencart are not comprehensive.
Given the information from 123-reg, does anyone know how/if it can be configured?
Regards
SMTP Hostname: localhost
(with no ssl:// or tls://)
SMTP Port: 25
SMTP Username: (blank)
SMTP Password: (blank)
This will switch off authentication and encryption.
Users browsing this forum: No registered users and 8 guests