Hi,
I tried setting up Office365 in Opencart but met with internal error. May I know if anyone managed to solve this? I tried with gmail its working.
below is the setting i use for Office365
mail protocol : SMTP
mail parameter : blank
smtp hostname : ssl://smtp.office365.com
smtp username : user@example.com
smtp password : password
smtp port : 587
smtp timeout : 5
I tried setting up Office365 in Opencart but met with internal error. May I know if anyone managed to solve this? I tried with gmail its working.
below is the setting i use for Office365
mail protocol : SMTP
mail parameter : blank
smtp hostname : ssl://smtp.office365.com
smtp username : user@example.com
smtp password : password
smtp port : 587
smtp timeout : 5
Followed is a documentation on how to setup Office 365 emails as multifunction: https://support.office.com/en-us/articl ... 05d654b4c4 . See the table beginning with: Device or Application setting and value.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
hello both ssl or tls not work i get error
error
<b>Warning</b>: fsockopen(): unable to connect to tls://smtp.office365.com:587 (Network is unreachable) in <b>/home/ admin/domains/wowmart.cn/public_html/system/library/mail/ smtp.php</b> on line <b>87</b>
error
<b>Warning</b>: fsockopen(): unable to connect to tls://smtp.office365.com:587 (Network is unreachable) in <b>/home/ admin/domains/wowmart.cn/public_html/system/library/mail/ smtp.php</b> on line <b>87</b>
(Network is unreachable) suggests a network issue. Contact your host, maybe they block outgoing mail.
Choicecloud wrote: ↑Wed Nov 11, 2020 7:28 pmOffice 365 uses TLS.
In the SMTP server : tls://smtp.office365.com
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Do your lines 81 to 87 of system/library/mail/smtp.php look like this?
tls:// is not a scheme like ssl:// and as such OC strips that from the hostname before connecting.
It only uses the tls:// definition in the given hostname as an indication that it needs to issue a STARTTLS command later on.
So fsockopen(): unable to connect to tls://smtp.office365.com:587 (Network is unreachable) should not happen as it should connect to smtp.office365.com:587 not tls://smtp.office365.com:587, tls:// is not a thing.
Connection to smtp.office365.com:587 works just fine as below where only the authentication eventually fails of course.
Mail Test initiated by: xxxxx
Sending from: xxxxx@xxxxxxxxxx
Sending to: xxxxx@xxxxxxxxxx
2021-10-11 15:17:26 - Host resolve: smtp.office365.com->52.98.42.194
2021-10-11 15:17:26 - Connecting to smtp.office365.com at 587
2021-10-11 15:17:26 - socket status: OK
2021-10-11 15:17:26 - SEND: EHLO xxxxxxx
[15:17:26.587644] EHLO 250-HKAPR03CA0010.outlook.office365.com Hello [x.x.x.x]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
2021-10-11 15:17:26 - SEND: STARTTLS
[15:17:26.603244] STARTTLS 220 2.0.0 SMTP server ready
2021-10-11 15:17:26 - SEND: EHLO xxxxxxxxxxxxxxxxxxx
[15:17:26.697447] EHLO 250-HKAPR03CA0010.outlook.office365.com Hello [x.x.x.x]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-AUTH LOGIN XOAUTH2
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
2021-10-11 15:17:26 - SEND: AUTH LOGIN
[15:17:26.713448] AUTH LOGIN 334 VXNlcm5hbWU6
2021-10-11 15:17:26 - SEND: XXXXXXXXXXXXXXXXX base64 username
[15:17:26.731449] base64 username 334 UGFzc3dvcmQ6
2021-10-11 15:17:26 - SEND: XXXXXXXXXXXXXXX base64 password
[15:17:31.751736] base64 password 535 5.7.3 Authentication unsuccessful [HKAPR03CA0010.apcprd03.prod.outlook.com]
535 5.7.3 Authentication unsuccessful [HKAPR03CA0010.apcprd03.prod.outlook.com]
Error: Password not accepted from server
SEND TEST MAIL FAILED
Code: Select all
if (substr($this->smtp_hostname, 0, 3) == 'tls') {
$hostname = substr($this->smtp_hostname, 6);
} else {
$hostname = $this->smtp_hostname;
}
$handle = fsockopen($hostname, $this->smtp_port, $errno, $errstr, $this->smtp_timeout);
tls:// is not a scheme like ssl:// and as such OC strips that from the hostname before connecting.
It only uses the tls:// definition in the given hostname as an indication that it needs to issue a STARTTLS command later on.
So fsockopen(): unable to connect to tls://smtp.office365.com:587 (Network is unreachable) should not happen as it should connect to smtp.office365.com:587 not tls://smtp.office365.com:587, tls:// is not a thing.
Connection to smtp.office365.com:587 works just fine as below where only the authentication eventually fails of course.
Mail Test initiated by: xxxxx
Sending from: xxxxx@xxxxxxxxxx
Sending to: xxxxx@xxxxxxxxxx
2021-10-11 15:17:26 - Host resolve: smtp.office365.com->52.98.42.194
2021-10-11 15:17:26 - Connecting to smtp.office365.com at 587
2021-10-11 15:17:26 - socket status: OK
2021-10-11 15:17:26 - SEND: EHLO xxxxxxx
[15:17:26.587644] EHLO 250-HKAPR03CA0010.outlook.office365.com Hello [x.x.x.x]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
2021-10-11 15:17:26 - SEND: STARTTLS
[15:17:26.603244] STARTTLS 220 2.0.0 SMTP server ready
2021-10-11 15:17:26 - SEND: EHLO xxxxxxxxxxxxxxxxxxx
[15:17:26.697447] EHLO 250-HKAPR03CA0010.outlook.office365.com Hello [x.x.x.x]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-AUTH LOGIN XOAUTH2
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
2021-10-11 15:17:26 - SEND: AUTH LOGIN
[15:17:26.713448] AUTH LOGIN 334 VXNlcm5hbWU6
2021-10-11 15:17:26 - SEND: XXXXXXXXXXXXXXXXX base64 username
[15:17:26.731449] base64 username 334 UGFzc3dvcmQ6
2021-10-11 15:17:26 - SEND: XXXXXXXXXXXXXXX base64 password
[15:17:31.751736] base64 password 535 5.7.3 Authentication unsuccessful [HKAPR03CA0010.apcprd03.prod.outlook.com]
535 5.7.3 Authentication unsuccessful [HKAPR03CA0010.apcprd03.prod.outlook.com]
Error: Password not accepted from server
SEND TEST MAIL FAILED
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
Who is online
Users browsing this forum: nonnedelectari and 225 guests