I'm integrating office smtp mail. I've add all the cred to settings >store>mail section. And pop enabled for my office email Id.If I use gmail I receive mail for confirm order , register etc... but then if I integrate Office mail I don't receive any mail for confirm order , register etc... and the screen freezes
and error logs found
PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\smtp.php on line 87
2020-09-23 14:48:12 - PHP Warning: fsockopen(): Failed to enable crypto in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\smtp.php on line 87
2020-09-23 14:48:12 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.office365.com:587 (Unknown error) in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\smtp.php on line 87
Any help is appreciated.
Please, lemme know I stuck past 3 days.
updated code
following are my creds this my local host
engine - smtp
SMTP Hostname-tls://smtp.office365.com
smtp username - my username
smtp pwd - my pwd
smtpr port -587
error Logs
2020-09-23 14:48:12 - PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\smtp.php on line 87
2020-09-23 14:48:12 - PHP Warning: fsockopen(): Failed to enable crypto in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\smtp.php on line 87
2020-09-23 14:48:12 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.office365.com:587 (Unknown error) in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\smtp.php on line 87
If i use default mailer it doesnt work either
it throws
2020-09-24 9:45:10 - PHP Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\mail.php on line 77
Updated - server n local gmail work but not outlook the above errors face dofr local but then the same configuration on to server there are not error thrown in error logs
Server all ports 465/587/25 are all open
Regards,
TLHIR
Port 587 requires crypto with SSL v3. SSL v2 would suffice, however. With a virtual server, it may be harden to enable crypto library. However, on a production server, this may be more doable.Failed to enable crypto
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Code: Select all
[09:28:58] using mailqueue\smtp adapter
2020-09-24 09:28:58 - Host resolve: smtp.office365.com->52.98.37.34
2020-09-24 09:28:58 - Connecting to smtp.office365.com at 587
2020-09-24 09:28:58 - socket status: OK
2020-09-24 09:28:58 - SEND: EHLO yyyyyyyyyyyyyyyyyy
[09:28:58.343792] EHLO 250-HK2PR03CA0056.outlook.office365.com Hello [xxxxxxxxxxxxxxx]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
2020-09-24 09:28:58 - SEND: STARTTLS
[09:28:58.364794] STARTTLS 220 2.0.0 SMTP server ready
2020-09-24 09:28:58 - SEND: EHLO yyyyyyyyyyyyyyyyyyy
[09:28:58.966828] EHLO 250-HK2PR03CA0056.outlook.office365.com Hello [xxxxxxxxxxxxxxx]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-AUTH LOGIN XOAUTH2
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
2020-09-24 09:28:58 - SEND: AUTH LOGIN
[09:28:58.987829] AUTH LOGIN 334 VXNlcm5hbWU6
2020-09-24 09:28:58 - SEND: ZmZmZmZm base64 username
[09:28:59.9831] base64 username 334 UGFzc3dvcmQ6
2020-09-24 09:28:59 - SEND: ZmZmZmZmZg== base64 password
[09:29:04.33118] base64 password 535 5.7.3 Authentication unsuccessful [HK2PR03CA0056.apcprd03.prod.outlook.com]
sendMailDirectMail: [09:28:58] using mailqueue\smtp adapter
2020-09-24 09:28:58 - Host resolve: smtp.office365.com->52.98.37.34
2020-09-24 09:28:58 - Connecting to smtp.office365.com at 587
2020-09-24 09:28:58 - socket status: OK
2020-09-24 09:28:58 - SEND: EHLO yyyyyyyyyyyyyyy
[09:28:58.343792] EHLO 250-HK2PR03CA0056.outlook.office365.com Hello [xxxxxxxxxxxx]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
2020-09-24 09:28:58 - SEND: STARTTLS
[09:28:58.364794] STARTTLS 220 2.0.0 SMTP server ready
2020-09-24 09:28:58 - SEND: EHLO yyyyyyyyyyyyyyyyyy
[09:28:58.966828] EHLO 250-HK2PR03CA0056.outlook.office365.com Hello [xxxxxxxxxxxxxx]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-AUTH LOGIN XOAUTH2
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
2020-09-24 09:28:58 - SEND: AUTH LOGIN
[09:28:58.987829] AUTH LOGIN 334 VXNlcm5hbWU6
2020-09-24 09:28:58 - SEND: ZmZmZmZm base64 username
[09:28:59.9831] base64 username 334 UGFzc3dvcmQ6
2020-09-24 09:28:59 - SEND: ZmZmZmZmZg== base64 password
[09:29:04.33118] base64 password 535 5.7.3 Authentication unsuccessful [HK2PR03CA0056.apcprd03.prod.outlook.com]
535 5.7.3 Authentication unsuccessful [HK2PR03CA0056.apcprd03.prod.outlook.com]
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.
PhpINFoADD Creative wrote: ↑Thu Sep 24, 2020 5:03 amWhat OpenCart version, PHP version and mail settings are you using?
PHP Version 7.4.3
mail settings---mail.add_x_header Off Off
mail.force_extra_parameters no value no value
mail.log no value no value
sendmail_from no value no value
sendmail_path no value no value
Internal Sendmail Support for Windows enabled
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.
You still haven't provided your OpenCart version.TLHIR wrote: ↑Thu Sep 24, 2020 5:43 pmPhpINFoADD Creative wrote: ↑Thu Sep 24, 2020 5:03 amWhat OpenCart version, PHP version and mail settings are you using?
PHP Version 7.4.3
mail settings---mail.add_x_header Off Off
mail.force_extra_parameters no value no value
mail.log no value no value
sendmail_from no value no value
sendmail_path no value no value
Internal Sendmail Support for Windows enabled
It looks like you are on XAMPP on windows. Check you have the following in your php.ini and "OpenSSL support" is enabled in your phpinfo().
Code: Select all
extension=php_openssl.dll
Note that ss:// doesn't not actually use SSL, starting with PHP 7.2, it will actually only use TLS. Also tls:// will tell OpenCart to not use any encryption to start with but to send a STARTTLS command to upgrade the connection to use TLS once connected.
You can't use the OpenCart "Mail" engine as XAMPP is usually set up to use the included Mercury mail server on localhost.
tried this too not workingletxobnav wrote: ↑Thu Sep 24, 2020 9:33 amport 587 is for tls, not ssl so use tls://
I do not have your credentials so authentication fails.Code: Select all
[09:28:58] using mailqueue\smtp adapter 2020-09-24 09:28:58 - Host resolve: smtp.office365.com->52.98.37.34 2020-09-24 09:28:58 - Connecting to smtp.office365.com at 587 2020-09-24 09:28:58 - socket status: OK 2020-09-24 09:28:58 - SEND: EHLO yyyyyyyyyyyyyyyyyy [09:28:58.343792] EHLO 250-HK2PR03CA0056.outlook.office365.com Hello [xxxxxxxxxxxxxxx] 250-SIZE 157286400 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-8BITMIME 250-BINARYMIME 250-CHUNKING 250 SMTPUTF8 2020-09-24 09:28:58 - SEND: STARTTLS [09:28:58.364794] STARTTLS 220 2.0.0 SMTP server ready 2020-09-24 09:28:58 - SEND: EHLO yyyyyyyyyyyyyyyyyyy [09:28:58.966828] EHLO 250-HK2PR03CA0056.outlook.office365.com Hello [xxxxxxxxxxxxxxx] 250-SIZE 157286400 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-AUTH LOGIN XOAUTH2 250-8BITMIME 250-BINARYMIME 250-CHUNKING 250 SMTPUTF8 2020-09-24 09:28:58 - SEND: AUTH LOGIN [09:28:58.987829] AUTH LOGIN 334 VXNlcm5hbWU6 2020-09-24 09:28:58 - SEND: ZmZmZmZm base64 username [09:28:59.9831] base64 username 334 UGFzc3dvcmQ6 2020-09-24 09:28:59 - SEND: ZmZmZmZmZg== base64 password [09:29:04.33118] base64 password 535 5.7.3 Authentication unsuccessful [HK2PR03CA0056.apcprd03.prod.outlook.com] sendMailDirectMail: [09:28:58] using mailqueue\smtp adapter 2020-09-24 09:28:58 - Host resolve: smtp.office365.com->52.98.37.34 2020-09-24 09:28:58 - Connecting to smtp.office365.com at 587 2020-09-24 09:28:58 - socket status: OK 2020-09-24 09:28:58 - SEND: EHLO yyyyyyyyyyyyyyy [09:28:58.343792] EHLO 250-HK2PR03CA0056.outlook.office365.com Hello [xxxxxxxxxxxx] 250-SIZE 157286400 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-8BITMIME 250-BINARYMIME 250-CHUNKING 250 SMTPUTF8 2020-09-24 09:28:58 - SEND: STARTTLS [09:28:58.364794] STARTTLS 220 2.0.0 SMTP server ready 2020-09-24 09:28:58 - SEND: EHLO yyyyyyyyyyyyyyyyyy [09:28:58.966828] EHLO 250-HK2PR03CA0056.outlook.office365.com Hello [xxxxxxxxxxxxxx] 250-SIZE 157286400 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-AUTH LOGIN XOAUTH2 250-8BITMIME 250-BINARYMIME 250-CHUNKING 250 SMTPUTF8 2020-09-24 09:28:58 - SEND: AUTH LOGIN [09:28:58.987829] AUTH LOGIN 334 VXNlcm5hbWU6 2020-09-24 09:28:58 - SEND: ZmZmZmZm base64 username [09:28:59.9831] base64 username 334 UGFzc3dvcmQ6 2020-09-24 09:28:59 - SEND: ZmZmZmZmZg== base64 password [09:29:04.33118] base64 password 535 5.7.3 Authentication unsuccessful [HK2PR03CA0056.apcprd03.prod.outlook.com] 535 5.7.3 Authentication unsuccessful [HK2PR03CA0056.apcprd03.prod.outlook.com] 7 Error: Password not accepted from server SEND TEST MAIL FAILED
Please, check updated questionstraightlight wrote: ↑Thu Sep 24, 2020 7:17 amPort 587 requires crypto with SSL v3. SSL v2 would suffice, however. With a virtual server, it may be harden to enable crypto library. However, on a production server, this may be more doable.Failed to enable crypto
tried all this not workin please check my updated questionADD Creative wrote: ↑Thu Sep 24, 2020 6:58 pmYou still haven't provided your OpenCart version.TLHIR wrote: ↑Thu Sep 24, 2020 5:43 pmPhpINFoADD Creative wrote: ↑Thu Sep 24, 2020 5:03 amWhat OpenCart version, PHP version and mail settings are you using?
PHP Version 7.4.3
mail settings---mail.add_x_header Off Off
mail.force_extra_parameters no value no value
mail.log no value no value
sendmail_from no value no value
sendmail_path no value no value
Internal Sendmail Support for Windows enabled
It looks like you are on XAMPP on windows. Check you have the following in your php.ini and "OpenSSL support" is enabled in your phpinfo().You need to use either tls://smtp.office365.com with port 587 or ssl://smtp.office365.com with port 465. Try these and see what errors you get. The errors you have posted to date no not indicate you have tried the either of the two correct settings.Code: Select all
extension=php_openssl.dll
Note that ss:// doesn't not actually use SSL, starting with PHP 7.2, it will actually only use TLS. Also tls:// will tell OpenCart to not use any encryption to start with but to send a STARTTLS command to upgrade the connection to use TLS once connected.
You can't use the OpenCart "Mail" engine as XAMPP is usually set up to use the included Mercury mail server on localhost.
2020-09-23 14:48:12 - PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\smtp.php on line 87
2020-09-23 14:48:12 - PHP Warning: fsockopen(): Failed to enable crypto in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\smtp.php on line 87
2020-09-23 14:48:12 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.office365.com:587 (Unknown error) in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\smtp.php on line 87
If i use default mailer it doesnt work either
it throws
2020-09-24 9:45:10 - PHP Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\mail.php on line 77
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.
None of you errors in your original post indicate you have tried tls://smtp.office365.com with port 587. Clear you error log and try tls://smtp.office365.com with port 587 and post the new errors from your error log (please don't update your original post). If port 587 doesn't work, you could try port 25.
updated code
following are my creds this my local host
engine - smtp
SMTP Hostname-tls://smtp.office365.com
smtp username - my username
smtp pwd - my pwd
smtpr port -587
I've tried both port 587,25 yet not working
error Logs
2020-09-23 14:48:12 - PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\smtp.php on line 87
2020-09-23 14:48:12 - PHP Warning: fsockopen(): Failed to enable crypto in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\smtp.php on line 87
2020-09-23 14:48:12 - PHP Warning: fsockopen(): unable to connect to ssl://smtp.office365.com:587 (Unknown error) in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\smtp.php on line 87
If i use default mailer it doesnt work either
it throws
2020-09-24 9:45:10 - PHP Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Program Files\XAMPP\htdocs\opencart2\upload\system\library\mail\mail.php on line 77
Updated - server n local gmail work but not outlook the above errors face dofr local but then the same configuration on to server there are not error thrown in error logs
Server all ports 465/587/25 are all open
engine - smtp
SMTP Hostname-tls://smtp.office365.com
smtp username - xyz@abc.com
smtp pwd - my pwd
smtpr port -587
the username used is smtp username - xyz@abc.com not xyz@outlook.com /xyz@office.com
is that the domain issue?
Following is the error log
2020-09-25 9:21:48 - PHP Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /opt/bitnami/opencart/system/library/mail/smtp.php on line 87
2020-09-25 9:21:48 - PHP Warning: fsockopen(): unable to connect to tls://smtp.office365.com:587 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /opt/bitnami/opencart/system/library/mail/smtp.php on line 87
for the following creds
engine - smtp
SMTP Hostname-tls://smtp.office365.com
smtp username - my username
smtp pwd - my pwd
smtpr port -587
Following is the error log
2020-09-25 9:24:14 - PHP Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /opt/bitnami/opencart/system/library/mail/smtp.php on line 87
2020-09-25 9:24:14 - PHP Warning: fsockopen(): unable to connect to tls://smtp.office365.com:25 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /opt/bitnami/opencart/system/library/mail/smtp.php on line 87
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.
With x being what?
Your SMTP Hostname "tls://smtp.office365.com" does not match the hostname "ssl://smtp.office365.com:587" in your error. That is not the error for that hostname. Did you test with that hostname on XAMPP and what error did?
You now seem to be testing on a different web server. As letxobnav pointed out this is a issue with your web server unable to reach your SMTP hostname. However that is not the whole story as your error has the hostname of "tls://smtp.office365.com:587". This is actually impossible as OpenCart strips the "tls://" off the hostname before doing the fsockopen. See the lines of code at the link below.TLHIR wrote: ↑Fri Sep 25, 2020 5:23 pm2020-09-25 9:21:48 - PHP Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /opt/bitnami/opencart/system/library/mail/smtp.php on line 87
2020-09-25 9:21:48 - PHP Warning: fsockopen(): unable to connect to tls://smtp.office365.com:587 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /opt/bitnami/opencart/system/library/mail/smtp.php on line 87
https://github.com/opencart/opencart/bl ... hp#L81-L87
There is something you are not telling us. Are you using any modifications that could affect them OpenCart mail system? Are you editing the hostnames in the error messages before posting them?
Users browsing this forum: JessiesBoutique, OSWorX and 513 guests