Post by letxobnav » Fri Feb 21, 2020 11:23 pm

there is no problem sending ssl smtp mail if the receiving mail server accepts it.
and tls:// is futile as the smtp class strips that out anyway, using the right port will suffice.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by xxvirusxx » Fri Feb 21, 2020 11:47 pm

letxobnav wrote:
Fri Feb 21, 2020 11:23 pm
there is no problem sending ssl smtp mail if the receiving mail server accepts it.
Maybe...

When I made a test on my server using same SMTP settings, 2.3.0.2 sended e-mails, 3.0.x.x no.
Test was made with website mail account and not gmail account.

My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by letxobnav » Sat Feb 22, 2020 12:35 am

When I made a test on my server using same SMTP settings, 2.3.0.2 sended e-mails, 3.0.x.x no.
This is meaningless without mail debug information.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by Sportfreunde » Sat Feb 22, 2020 10:59 am

i see in the smtp.php

Code: Select all

<?php
namespace Mail;
class Smtp {
	public $smtp_hostname;
	public $smtp_username;
	public $smtp_password;
	public $smtp_port = 25;
	public $smtp_timeout = 5;
	public $verp = false;
	
What needs to be adjusted here? When I specify user, server etc. the error messages get shorter
Last edited by straightlight on Sat Feb 22, 2020 11:50 am, edited 1 time in total.
Reason: Added code tags.

New member

Posts

Joined
Sat Nov 30, 2019 4:46 am

Post by straightlight » Sat Feb 22, 2020 11:51 am

There is nothing wrong with the email class. You need to properly configure your email settings from your admin - > systems - > settings - > add / edit settings - > Mail tab.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by letxobnav » Sat Feb 22, 2020 12:22 pm

When I specify user, server etc. the error messages get shorter
That is information we can work with.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by xxvirusxx » Sat Feb 22, 2020 3:03 pm

letxobnav wrote:
Sat Feb 22, 2020 12:35 am
This is meaningless without mail debug information.
2.3.0.2 work out the box.
3.0.x.x doesn't work.
Both version use same settings from attached file.

And are more posts...
viewtopic.php?t=208832
viewtopic.php?t=207105

Attachments

smt_settings.png

smt_settings.png (27.29 KiB) Viewed 856 times

smtp_errors.png

smtp_errors.png (70.8 KiB) Viewed 856 times


My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by sw!tch » Sat Feb 22, 2020 4:27 pm

xxvirusxx wrote:
Sat Feb 22, 2020 3:03 pm
3.0.x.x doesn't work.
@xxvirusxx since you're able to duplicate. Curious if you log $reply to your error log what's the result look like?

Code: Select all

if (substr($reply, 0, 3) != 250) {
If possible log $reply, right above that line.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by xxvirusxx » Sat Feb 22, 2020 4:59 pm

sw!tch wrote:
Sat Feb 22, 2020 4:27 pm

Curious if you log $reply to your error log what's the result look like?

Code: Select all

$this->log->write($reply);
?

My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by sw!tch » Sat Feb 22, 2020 5:07 pm

Code: Select all

$log = new Log('mail_log');
$log->write($reply);
Then check your storage/logs dir for mail_log after you run a test.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by xxvirusxx » Sat Feb 22, 2020 5:11 pm

Added before of if (substr($reply, 0, 3) != 250) { and show error

Code: Select all

Uncaught Error: Class 'Mail\Log' not found in /system/library/mail/smtp.php:120

My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by sw!tch » Sat Feb 22, 2020 5:15 pm

Try once more with slash on log. Like below.

Code: Select all

$log = new \Log('mail_log');
$log->write($reply);

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by xxvirusxx » Sat Feb 22, 2020 5:24 pm

Correct settings:

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 I think this Mail configuration should be improved on 3.1.x. To autodetect settings if is SSL, TLS, like in Thunderbird.
Last edited by xxvirusxx on Sat Feb 22, 2020 5:59 pm, edited 1 time in total.

My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by letxobnav » Sat Feb 22, 2020 6:22 pm

tests based on some obscure free mail sertver and to top it off using port 995? really?

[22-Feb-2020 18:00:12 Asia/Taipei] Opening Mail socket to mail.free-time-info.com:25 with timeout 5
[22-Feb-2020 18:00:13 Asia/Taipei] Mail socket open mail.free-time-info.com:25
[22-Feb-2020 18:00:13 Asia/Taipei] Command: EHLO www.crystallight.com.tw
[22-Feb-2020 18:00:13 Asia/Taipei] OK: EHLO accepted from server!

[22-Feb-2020 18:00:46 Asia/Taipei] Opening Mail socket to mail.free-time-info.com:995 with timeout 5
[22-Feb-2020 18:00:46 Asia/Taipei] Mail socket open mail.free-time-info.com:995
[22-Feb-2020 18:01:46 Asia/Taipei] Command: EHLO www.crystallight.com.tw
[22-Feb-2020 18:01:47 Asia/Taipei] Error: EHLO not accepted from server!

[22-Feb-2020 18:02:49 Asia/Taipei] Opening Mail socket to mail.free-time-info.com:465 with timeout 5
[22-Feb-2020 18:02:50 Asia/Taipei] Mail socket open mail.free-time-info.com:465
[22-Feb-2020 18:03:50 Asia/Taipei] Command: EHLO www.crystallight.com.tw
[22-Feb-2020 18:03:50 Asia/Taipei] Error: EHLO not accepted from server!]

[22-Feb-2020 18:06:46 Asia/Taipei] Opening Mail socket to mail.free-time-info.com:587 with timeout 5
[22-Feb-2020 18:06:46 Asia/Taipei] Mail socket open mail.free-time-info.com:587
[22-Feb-2020 18:06:46 Asia/Taipei] Command: EHLO www.crystallight.com.tw
[22-Feb-2020 18:06:47 Asia/Taipei] OK: EHLO accepted from server!

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by xxvirusxx » Sat Feb 22, 2020 6:28 pm

I don't know why you get EHLO error on 465 , because work only with ssl:// :)..Ah..because test was made without ssl://...

So that's why mail library should auto detect if is SSL, TLS...and to use only mail.site.com and not ssl://mail.site.com
Yes, 995 was my mystake. I saw today :laugh:

My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by letxobnav » Sun Feb 23, 2020 12:19 am

ok, full mail server communications for your mail host:

Of course I do not have your credentials so authentications fail.
If you want to test it yourself, go to my MailQueue demo site and run the tests yourself with your credentials.
https://www.crystallight.com.tw/demo32/admin
demo/demo
go to mailqueue->settings->test mail

port 25

Code: Select all

Mail Test initiated by: demo
Sending from: test@free-time-info.com
Sending to: test@free-time-info.com
[16:02:15] using mailqueue\smtp adapter
2020-02-22 16:02:16 - Host resolve: mail.free-time-info.com->89.42.218.27
2020-02-22 16:02:16 - Connecting to mail.free-time-info.com at 25
2020-02-22 16:02:16 - socket status: OK
2020-02-22 16:02:18 - SEND: EHLO www.crystallight.com.tw
[16:02:18.350503] EHLO 250-server-0276.whmpanels.com Hello 114-32-22-188.hinet-ip.hinet.net [114.32.22.188]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP

2020-02-22 16:02:18 - SEND: EHLO www.crystallight.com.tw
[16:02:18.664521] EHLO 250-server-0276.whmpanels.com Hello 114-32-22-188.hinet-ip.hinet.net [114.32.22.188]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP

2020-02-22 16:02:18 - SEND: MAIL FROM: <test@free-time-info.com>
[16:02:18.978539] MAIL FROM 250 OK

2020-02-22 16:02:18 - SEND: RCPT TO: <test@free-time-info.com>
[16:02:19.967595] RCPT TO SINGLE 451-Please deliver mail to the address specified in the MX records for this
451 domain.


sendMailDirectMail: [16:02:15] using mailqueue\smtp adapter
2020-02-22 16:02:16 - Host resolve: mail.free-time-info.com->89.42.218.27
2020-02-22 16:02:16 - Connecting to mail.free-time-info.com at 25
2020-02-22 16:02:16 - socket status: OK
2020-02-22 16:02:18 - SEND: EHLO www.crystallight.com.tw
[16:02:18.350503] EHLO 250-server-0276.whmpanels.com Hello 114-32-22-188.hinet-ip.hinet.net [114.32.22.188]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP

2020-02-22 16:02:18 - SEND: EHLO www.crystallight.com.tw
[16:02:18.664521] EHLO 250-server-0276.whmpanels.com Hello 114-32-22-188.hinet-ip.hinet.net [114.32.22.188]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP

2020-02-22 16:02:18 - SEND: MAIL FROM: <test@free-time-info.com>
[16:02:18.978539] MAIL FROM 250 OK

2020-02-22 16:02:18 - SEND: RCPT TO: <test@free-time-info.com>
[16:02:19.967595] RCPT TO SINGLE 451-Please deliver mail to the address specified in the MX records for this
451 domain.

451-Please deliver mail to the address specified in the MX records for this
451 domain.

10 Error: RCPT TO not accepted from server
SEND TEST MAIL FAILED
port 995

Code: Select all

Mail Test initiated by: demo
Sending from: test@free-time-info.com
Sending to: test@free-time-info.com
[16:03:13] using mailqueue\smtp adapter
2020-02-22 16:03:13 - Host resolve: mail.free-time-info.com->89.42.218.27
2020-02-22 16:03:13 - Connecting to mail.free-time-info.com at 995
2020-02-22 16:03:14 - socket status: OK
2020-02-22 16:04:14 - SEND: EHLO www.crystallight.com.tw
[16:04:14.431142] EHLO 

sendMailDirectMail: [16:03:13] using mailqueue\smtp adapter
2020-02-22 16:03:13 - Host resolve: mail.free-time-info.com->89.42.218.27
2020-02-22 16:03:13 - Connecting to mail.free-time-info.com at 995
2020-02-22 16:03:14 - socket status: OK
2020-02-22 16:04:14 - SEND: EHLO www.crystallight.com.tw
[16:04:14.431142] EHLO 

2 Error: EHLO not accepted from server
SEND TEST MAIL FAILED
port 465

Code: Select all

Mail Test initiated by: demo
Sending from: test@free-time-info.com
Sending to: test@free-time-info.com
[16:05:20] using mailqueue\smtp adapter
2020-02-22 16:05:21 - Host resolve: ssl://mail.free-time-info.com->ssl://mail.free-time-info.com
2020-02-22 16:05:21 - Connecting to ssl://mail.free-time-info.com at 465
2020-02-22 16:05:36 - No Handle

sendMailDirectMail: [16:05:20] using mailqueue\smtp adapter
2020-02-22 16:05:21 - Host resolve: ssl://mail.free-time-info.com->ssl://mail.free-time-info.com
2020-02-22 16:05:21 - Connecting to ssl://mail.free-time-info.com at 465
2020-02-22 16:05:36 - No Handle1 Error:  (0)
SEND TEST MAIL FAILED
port 587

Code: Select all

Mail Test initiated by: demo
Sending from: test@free-time-info.com
Sending to: test@free-time-info.com
[16:09:21] using mailqueue\smtp adapter
2020-02-22 16:09:21 - Host resolve: mail.free-time-info.com->89.42.218.27
2020-02-22 16:09:21 - Connecting to mail.free-time-info.com at 587
2020-02-22 16:09:24 - socket status: OK
2020-02-22 16:09:24 - SEND: EHLO www.crystallight.com.tw
[16:09:25.215918] EHLO 250-server-0276.whmpanels.com Hello 114-32-22-188.hinet-ip.hinet.net [114.32.22.188]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP

2020-02-22 16:09:25 - SEND: STARTTLS
[16:09:25.551938] STARTTLS 220 TLS go ahead

2020-02-22 16:09:26 - SEND: EHLO www.crystallight.com.tw
[16:09:26.598997] EHLO 250-server-0276.whmpanels.com Hello 114-32-22-188.hinet-ip.hinet.net [114.32.22.188]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250 HELP

2020-02-22 16:09:26 - SEND: AUTH LOGIN
[16:09:26.934017] AUTH LOGIN 334 VXNlcm5hbWU6

2020-02-22 16:09:26 - SEND: dGVzdEBmcmVlLXRpbWUtaW5mby5jb20= base64 username
[16:09:27.268036] base64 username 334 UGFzc3dvcmQ6

2020-02-22 16:09:27 - SEND: dGVzdA== base64 password
[16:09:29.614170] base64 password 535 Incorrect authentication data


sendMailDirectMail: [16:09:21] using mailqueue\smtp adapter
2020-02-22 16:09:21 - Host resolve: mail.free-time-info.com->89.42.218.27
2020-02-22 16:09:21 - Connecting to mail.free-time-info.com at 587
2020-02-22 16:09:24 - socket status: OK
2020-02-22 16:09:24 - SEND: EHLO www.crystallight.com.tw
[16:09:25.215918] EHLO 250-server-0276.whmpanels.com Hello 114-32-22-188.hinet-ip.hinet.net [114.32.22.188]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP

2020-02-22 16:09:25 - SEND: STARTTLS
[16:09:25.551938] STARTTLS 220 TLS go ahead

2020-02-22 16:09:26 - SEND: EHLO www.crystallight.com.tw
[16:09:26.598997] EHLO 250-server-0276.whmpanels.com Hello 114-32-22-188.hinet-ip.hinet.net [114.32.22.188]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250 HELP

2020-02-22 16:09:26 - SEND: AUTH LOGIN
[16:09:26.934017] AUTH LOGIN 334 VXNlcm5hbWU6

2020-02-22 16:09:26 - SEND: dGVzdEBmcmVlLXRpbWUtaW5mby5jb20= base64 username
[16:09:27.268036] base64 username 334 UGFzc3dvcmQ6

2020-02-22 16:09:27 - SEND: dGVzdA== base64 password
[16:09:29.614170] base64 password 535 Incorrect authentication data

535 Incorrect authentication data

7 Error: Password not accepted from server
SEND TEST MAIL FAILED

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by xxvirusxx » Mon Feb 24, 2020 1:28 am

yes, work without problem on 465.

Also your extension detect ssl://....based on port...I think, so you don't need to enter ssl://mail just mail.xxxx.
On opencart settings if you don`t enter ssl://mail...., then mail test failed. This "feature" should be added on Opencart...

Attachments

Screenshot_2020-02-23_19-23-28.png

Screenshot_2020-02-23_19-23-28.png (39.61 KiB) Viewed 659 times


My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Mon Feb 24, 2020 2:11 am

xxvirusxx wrote:
Mon Feb 24, 2020 1:28 am
yes, work without problem on 465.

Also your extension detect ssl://....based on port...I think, so you don't need to enter ssl://mail just mail.xxxx.
On opencart settings if you don`t enter ssl://mail...., then mail test failed. This "feature" should be added on Opencart...
Correct. I was able to test this theory during a custom job with port 465. Port ssl:// must be added prior to the mail hostname. Otherwise, the connection may fail to be established as compared to other servers.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by letxobnav » Mon Feb 24, 2020 12:25 pm

Also your extension detect ssl://....based on port...I think, so you don't need to enter ssl://mail just mail.xxxx.
Yes, the same with 587 for tls, tls:// is no protocol so why confuse users to add that.
Better to keep it simple and just steer everything based on ports 25, 465, 587 and maybe 2525 (some isp's started to open that as alternative for 587).
So default OC should just have a "handshake" dropdown with "Standard", "TLS (Transport Layer Security)" and "SSL (Secure Sockets Layers)" with TLS as the preferred handshake and handle the the rest.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan
Who is online

Users browsing this forum: No registered users and 6 guests