Post by ATVDevelopments » Sun Feb 21, 2021 1:26 am

Hi,
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

email error.JPG (22.68 KiB) Viewed 19652 times

line87.JPG

line87.JPG (33.06 KiB) Viewed 19652 times

500.JPG

500.JPG (18.74 KiB) Viewed 19652 times

Last edited by ATVDevelopments on Thu Feb 25, 2021 10:28 pm, edited 1 time in total.

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



Posts

Joined
Thu Oct 22, 2020 4:10 am
Location - UK

Post by mikeinterserv » Sun Feb 21, 2021 1:32 am

Can you show the 500 error from your SERVER log

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ADD Creative » Sun Feb 21, 2021 1:44 am

ssl://smtp.123-reg.co.uk on port 465 would be correct. tls://smtp.123-reg.co.uk on port 587 would be another setting that should work.

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.

www.add-creative.co.uk


Guru Member

Posts

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

Post by ATVDevelopments » Sun Feb 21, 2021 1:47 am

mikeinterserv wrote:
Sun Feb 21, 2021 1:32 am
Can you show the 500 error from your SERVER log
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



Posts

Joined
Thu Oct 22, 2020 4:10 am
Location - UK

Post by mikeinterserv » Sun Feb 21, 2021 1:53 am

ATVDevelopments wrote:
Sun Feb 21, 2021 1:47 am
mikeinterserv wrote:
Sun Feb 21, 2021 1:32 am
Can you show the 500 error from your SERVER log
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)
Well there you have it
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
Last edited by mikeinterserv on Sun Feb 21, 2021 2:03 am, edited 1 time in total.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ATVDevelopments » Sun Feb 21, 2021 2:01 am

his error was the result of ssl and port 485, causing the 500 error
[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



Posts

Joined
Thu Oct 22, 2020 4:10 am
Location - UK

Post by mikeinterserv » Sun Feb 21, 2021 2:05 am

Try 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

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ATVDevelopments » Sun Feb 21, 2021 3:04 am

mikeinterserv wrote:
Sun Feb 21, 2021 2:05 am
Try 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
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.
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
------------
Last edited by ATVDevelopments on Sun Feb 21, 2021 3:21 am, edited 1 time in total.

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



Posts

Joined
Thu Oct 22, 2020 4:10 am
Location - UK

Post by ATVDevelopments » Sun Feb 21, 2021 3:18 am

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
This 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
---------------------

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



Posts

Joined
Thu Oct 22, 2020 4:10 am
Location - UK

Post by ADD Creative » Sun Feb 21, 2021 3:31 am

ATVDevelopments wrote:
Sun Feb 21, 2021 3:18 am
This 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
---------------------
They are suggesting your use.
SMTP Hostname: localhost
(with no ssl:// or tls://)
SMTP Port: 25

This is because they block all outgoing mail connections.

www.add-creative.co.uk


Guru Member

Posts

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

Post by mikeinterserv » Sun Feb 21, 2021 3:31 am

ATVDevelopments 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
Is it me is is this saying you CANNOT CONNECT
BUT then telling you the settings you need to use.
What to NOT connect :crazy:
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

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ATVDevelopments » Sun Feb 21, 2021 3:53 am

I've used this service from 123-reg for about 15 years, but a number of years ago they migrated me to a shared hosting.
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



Posts

Joined
Thu Oct 22, 2020 4:10 am
Location - UK

Post by mikeinterserv » Sun Feb 21, 2021 3:55 am

It 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.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ATVDevelopments » Sun Feb 21, 2021 4:08 am

mikeinterserv wrote:
Sun Feb 21, 2021 3:55 am
It 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.
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.
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

mailfail.JPG (80.26 KiB) Viewed 19246 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



Posts

Joined
Thu Oct 22, 2020 4:10 am
Location - UK

Post by mikeinterserv » Sun Feb 21, 2021 4:17 am

where is that reply to address coming from
from and reply to generally want to be the same

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ATVDevelopments » Sun Feb 21, 2021 4:45 am

mikeinterserv wrote:
Sun Feb 21, 2021 4:17 am
where is that reply to address coming from
from and reply to generally want to be the same
I really don't know. It's not in my configuration.
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

failmail2.JPG (73.85 KiB) Viewed 19105 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



Posts

Joined
Thu Oct 22, 2020 4:10 am
Location - UK

Post by sw!tch » Sun Feb 21, 2021 4:55 am

ATVDevelopments wrote:
Sun Feb 21, 2021 4:45 am
The migration to the shared hosting introduced the 'xrhngdmybe9' to my life and it seems that I have an email using this.
FYI - xrhngdmybe9 is your cpanel account user name, so its just referencing your cpanel account.

Contact your host they are best to resolve this.

Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by mikeinterserv » Sun Feb 21, 2021 5:29 am

You didn't do this did you
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

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ATVDevelopments » Wed Feb 24, 2021 5:55 pm

Mikeinterserv, 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.
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
From what I understand I need to use SMTP, but:
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



Posts

Joined
Thu Oct 22, 2020 4:10 am
Location - UK

Post by ADD Creative » Wed Feb 24, 2021 6:11 pm

ATVDevelopments wrote:
Wed Feb 24, 2021 5:55 pm
Mikeinterserv, 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.
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
From what I understand I need to use SMTP, but:
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
Try these settings.
SMTP Hostname: localhost
(with no ssl:// or tls://)
SMTP Port: 25
SMTP Username: (blank)
SMTP Password: (blank)

This will switch off authentication and encryption.

www.add-creative.co.uk


Guru Member

Posts

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

Users browsing this forum: Semrush [Bot] and 15 guests