Post by Hourglasss » Fri Aug 11, 2023 1:38 am

Im using same exact mail fields as my working 3.0.3.8
but it doesnt seem to work

Code: Select all

2023-08-10 17:45:46 - PHP Warning:  fsockopen(): Unable to connect to xxxx (Network is unreachable) in /var/www/html/opencart/system/library/mail/smtp.php on line 133
2023-08-10 17:45:46 - Exception:  Error: Network is unreachable (101) in /var/www/html/opencart/system/library/mail/smtp.php on line 259

Active Member

Posts

Joined
Mon Jan 23, 2023 10:39 pm

Post by straightlight » Fri Aug 11, 2023 2:03 am

Hourglasss wrote:
Fri Aug 11, 2023 1:38 am
Im using same exact mail fields as my working 3.0.3.8
but it doesnt seem to work

Code: Select all

2023-08-10 17:45:46 - PHP Warning:  fsockopen(): Unable to connect to xxxx (Network is unreachable) in /var/www/html/opencart/system/library/mail/smtp.php on line 133
2023-08-10 17:45:46 - Exception:  Error: Network is unreachable (101) in /var/www/html/opencart/system/library/mail/smtp.php on line 259
Is the OC v4.0.2.2 also installed on the same domain and the same server? You just need to compare both email settings from your OC admin > systems > settings > edit settings > mail tab.

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 Hourglasss » Fri Aug 11, 2023 7:25 pm

straightlight wrote:
Fri Aug 11, 2023 2:03 am
Hourglasss wrote:
Fri Aug 11, 2023 1:38 am
Im using same exact mail fields as my working 3.0.3.8
but it doesnt seem to work

Code: Select all

2023-08-10 17:45:46 - PHP Warning:  fsockopen(): Unable to connect to xxxx (Network is unreachable) in /var/www/html/opencart/system/library/mail/smtp.php on line 133
2023-08-10 17:45:46 - Exception:  Error: Network is unreachable (101) in /var/www/html/opencart/system/library/mail/smtp.php on line 259
Is the OC v4.0.2.2 also installed on the same domain and the same server? You just need to compare both email settings from your OC admin > systems > settings > edit settings > mail tab.
yea its on the same server thats what i litterly did i copied over the same exact smtp settings from 3.0.3.8 where smtp works and i can send and receive emails,

Active Member

Posts

Joined
Mon Jan 23, 2023 10:39 pm

Post by JNeuhoff » Fri Aug 11, 2023 8:36 pm

Do you have a cPanel? If so, you can lookup there the exact email settings for your SMTP and then configure your OpenCart admin backend at
System > Settings > edit Store > tab Mail

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


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by straightlight » Fri Aug 11, 2023 10:34 pm

Hourglasss wrote:
Fri Aug 11, 2023 7:25 pm
straightlight wrote:
Fri Aug 11, 2023 2:03 am
Hourglasss wrote:
Fri Aug 11, 2023 1:38 am
Im using same exact mail fields as my working 3.0.3.8
but it doesnt seem to work

Code: Select all

2023-08-10 17:45:46 - PHP Warning:  fsockopen(): Unable to connect to xxxx (Network is unreachable) in /var/www/html/opencart/system/library/mail/smtp.php on line 133
2023-08-10 17:45:46 - Exception:  Error: Network is unreachable (101) in /var/www/html/opencart/system/library/mail/smtp.php on line 259
Is the OC v4.0.2.2 also installed on the same domain and the same server? You just need to compare both email settings from your OC admin > systems > settings > edit settings > mail tab.
yea its on the same server thats what i litterly did i copied over the same exact smtp settings from 3.0.3.8 where smtp works and i can send and receive emails,
Please submit a screenshot of your host panel's email settings and your OC mail tab's email settings, both, without passwords.

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 Hourglasss » Sat Aug 12, 2023 8:58 pm

straightlight wrote:
Fri Aug 11, 2023 10:34 pm
Hourglasss wrote:
Fri Aug 11, 2023 7:25 pm
straightlight wrote:
Fri Aug 11, 2023 2:03 am


Is the OC v4.0.2.2 also installed on the same domain and the same server? You just need to compare both email settings from your OC admin > systems > settings > edit settings > mail tab.
yea its on the same server thats what i litterly did i copied over the same exact smtp settings from 3.0.3.8 where smtp works and i can send and receive emails,
Please submit a screenshot of your host panel's email settings and your OC mail tab's email settings, both, without passwords.
JNeuhoff wrote:
Fri Aug 11, 2023 8:36 pm
Do you have a cPanel? If so, you can lookup there the exact email settings for your SMTP and then configure your OpenCart admin backend at
System > Settings > edit Store > tab Mail
Image


im self hosting and using 3rd party for mail hosting,

im also using cloudflare but i configured cloudflare to forward and set ti up correctlly,
Cause it works with 3.0.3.8

Active Member

Posts

Joined
Mon Jan 23, 2023 10:39 pm

Post by Hourglasss » Sat Aug 12, 2023 9:09 pm

Image

Active Member

Posts

Joined
Mon Jan 23, 2023 10:39 pm

Post by straightlight » Sat Aug 12, 2023 10:33 pm

Hourglasss wrote:
Sat Aug 12, 2023 9:09 pm
Image
The configuration between your OC emails and your email server don't match. Ensure to properly compare the results when entering the email configurations in your OC admin mail tab. If you are unable to fill this in, you can also contact your host for assistance on this.

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 Hourglasss » Tue Aug 15, 2023 9:01 pm

straightlight wrote:
Sat Aug 12, 2023 10:33 pm
Hourglasss wrote:
Sat Aug 12, 2023 9:09 pm
Image
The configuration between your OC emails and your email server don't match. Ensure to properly compare the results when entering the email configurations in your OC admin mail tab. If you are unable to fill this in, you can also contact your host for assistance on this.

when using the "correct" smpt host settings i dont get any errors and i dont receive emails when sending emails via the contact form.,
im using nginx as server is there any server configuration needed to make smtp work, i allowed port 465 to the ufw firewall to.

Active Member

Posts

Joined
Mon Jan 23, 2023 10:39 pm

Post by ADD Creative » Wed Aug 16, 2023 1:13 am

If you don't get any errors, you then need to check the mail server logs.

www.add-creative.co.uk


Expert Member

Posts

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

Post by speakspaceAdmin » Wed Aug 16, 2023 2:56 pm

So I just spent the past few days upgrading from 3.0.3.2 to 4.0.2.2. Took me 4 days to figure out the email. DNS was the issue.

First: Opencart config
Mail
host: tls://email@domain.com
Username: your email
Password: your email password
port 587

thank make sure your DNS has:

the proper NS ALL 1 Hour (for Google Workspace it is the following)
ALT1.ASPMX.L.GOOGLE.COM
ALT2.ASPMX.L.GOOGLE.COM
ALT3.ASPMX.L.GOOGLE.COM
ALT4.ASPMX.L.GOOGLE.COM
ASPMX.L.GOOGLE.COM
smtp.google.com

Than make the A Record
localhost 127.0.0.1 30 seconds
domain.com <YOUR SERVER IP> 30 seconds
mail.YOURDOMAIN.com <YOUR SERVER IP> 30 seconds

and CNAME
webmail.<YOURDOMAINNAME>.com

Finally TXT record
YOUR DOMAIN. v=spf1 ip4:<YOUR IP4 ADDRESS> +a +mx +ip4:<YOUR IP4 ADDRESS> +include:relay.mailchannels.net +include:websitewelcome.com ~all

This should fix your email issue.


Posts

Joined
Sat Nov 26, 2022 7:24 pm

Post by Hourglasss » Tue Aug 22, 2023 12:15 am

speakspaceAdmin wrote:
Wed Aug 16, 2023 2:56 pm
So I just spent the past few days upgrading from 3.0.3.2 to 4.0.2.2. Took me 4 days to figure out the email. DNS was the issue.

First: Opencart config
Mail
host: tls://email@domain.com
Username: your email
Password: your email password
port 587

thank make sure your DNS has:

the proper NS ALL 1 Hour (for Google Workspace it is the following)
ALT1.ASPMX.L.GOOGLE.COM
ALT2.ASPMX.L.GOOGLE.COM
ALT3.ASPMX.L.GOOGLE.COM
ALT4.ASPMX.L.GOOGLE.COM
ASPMX.L.GOOGLE.COM
smtp.google.com

Than make the A Record
localhost 127.0.0.1 30 seconds
domain.com <YOUR SERVER IP> 30 seconds
mail.YOURDOMAIN.com <YOUR SERVER IP> 30 seconds

and CNAME
webmail.<YOURDOMAINNAME>.com

Finally TXT record
YOUR DOMAIN. v=spf1 ip4:<YOUR IP4 ADDRESS> +a +mx +ip4:<YOUR IP4 ADDRESS> +include:relay.mailchannels.net +include:websitewelcome.com ~all

This should fix your email issue.
where you having issues with default smtp settings to?

also you add those records to your cloudflare?

Active Member

Posts

Joined
Mon Jan 23, 2023 10:39 pm

Post by Hourglasss » Tue Aug 29, 2023 4:09 am

anyone else got smtp working? im using the correct settings,

im pretty sure there is a bug in smtp?

when i use my smtp settings on 3.0.3.8 works correctly so my dns records are correct,

these settings wrok on 3.0.3.8 but not 4.0.2.2

Image

Active Member

Posts

Joined
Mon Jan 23, 2023 10:39 pm

Post by ADD Creative » Tue Aug 29, 2023 7:15 am

Are the 3.0.3.8 and 4.0.2.2 sites on the same server? What errors do you see in the PHP error logs on 4.0.2.2?

www.add-creative.co.uk


Expert Member

Posts

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

Post by Hourglasss » Tue Aug 29, 2023 6:36 pm

ADD Creative wrote:
Tue Aug 29, 2023 7:15 am
Are the 3.0.3.8 and 4.0.2.2 sites on the same server? What errors do you see in the PHP error logs on 4.0.2.2?

yea they are on the same server

shouldnt the 3.0.3.8 settings work exactly the same with 4.0.2.2?

are there any other logs i could check?

Active Member

Posts

Joined
Mon Jan 23, 2023 10:39 pm

Post by ADD Creative » Tue Aug 29, 2023 7:50 pm

The same settings should work. Nothing much has changed in the SMTP connecting between the two versions. If you are getting "fsockopen(): Unable to connect to" errors then that suggests the settings haven't been entered correctly (maybe some whitespace or hidden characters) or a problem with the hosting.

www.add-creative.co.uk


Expert Member

Posts

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

Post by Hourglasss » Wed Aug 30, 2023 1:26 am

ADD Creative wrote:
Tue Aug 29, 2023 7:50 pm
The same settings should work. Nothing much has changed in the SMTP connecting between the two versions. If you are getting "fsockopen(): Unable to connect to" errors then that suggests the settings haven't been entered correctly (maybe some whitespace or hidden characters) or a problem with the hosting.
Yea im not getting any errors at all,
can you spin up a 4.0x.x shop and try to setup SMTP? to confirm or anyone else already got it working?
the only difference between my 3.0.3.8 shop and 4.0.x.x shop is that 3.0.3.8 is running apache and my 4.0.0 is running nginx that shouldnt matter toug right>?

Active Member

Posts

Joined
Mon Jan 23, 2023 10:39 pm

Post by ADD Creative » Wed Aug 30, 2023 7:18 am

SMTP works fine for me. If you are not seeing any errors in the OpenCart error log or the PHP error log, then check your mail server log to see it the email reached that stage.

www.add-creative.co.uk


Expert Member

Posts

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

Users browsing this forum: halfhope and 6 guests