I tested g-mail via ssl and port 465 and I do get e-mails. But wit smtp.office365 port 587 I do not. Has this something to do with TSL support, which is required by microsoft, but not supported by wappler?
Actually it should already work in NodeJs when the server correctly advertises the support for the STARTTLS extension, it then automatically will connect using TLS. Just leave the Use SSL option unchecked and it will auto detect.
Ok for other people struggling with this, there is this option of the server default mailer. If you set that up via sendmail it actually works. I am on a windows machine and you can download it here https://sourceforge.net/projects/send-mail/
I put it on my localhost C:\xampp\sendmail (on the production server use a different path) . In php,ini you need to update this line sendmail_path = C:\xampp\sendmail\sendmail.exe and uncomment other e-mail related lines. Hope this helps until the php Wappler update is there.
What has been the outcome of this? Is StartTLS supported with PHP now? I see the issue has been unassigned but it is not clear where we stand? @patrick@George
Thanks Patrick @patrick - can we confirm how StarTLS is enabled? I tried the SSL checkbox below and it doesn’t seem to work against a MS Outlook365 service account:
Thanks @patrick, I’m getting an authentication error, I’m note sure if the issue is on the code side or the vendor, in this case, I’m escalating to Microsoft and see what the outcome is:
2020-12-04 17:16:19 Connection: opening to smtp.office365.com:587, timeout=300, options=array ( 'ssl' => array ( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true, ),)<br>
2020-12-04 17:16:19 Connection: opened<br>
2020-12-04 17:16:19 SERVER -> CLIENT: 220 DB6PR0501CA0035.outlook.office365.com Microsoft ESMTP MAIL Service ready at Fri, 4 Dec 2020 17:16:19 +0000<br>
2020-12-04 17:16:19 CLIENT -> SERVER: EHLO 192.168.1.16<br>
2020-12-04 17:16:19 SERVER -> CLIENT: 250-DB6PR0501CA0035.outlook.office365.com Hello [188.141.18.79]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8<br>
2020-12-04 17:16:19 CLIENT -> SERVER: STARTTLS<br>
2020-12-04 17:16:19 SERVER -> CLIENT: 220 2.0.0 SMTP server ready<br>
2020-12-04 17:16:19 CLIENT -> SERVER: EHLO 192.168.1.16<br>
2020-12-04 17:16:19 SERVER -> CLIENT: 250-DB6PR0501CA0035.outlook.office365.com Hello [188.141.18.79]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-AUTH LOGIN XOAUTH2250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8<br>
2020-12-04 17:16:19 CLIENT -> SERVER: AUTH LOGIN<br>
2020-12-04 17:16:19 SERVER -> CLIENT: 334 VXNlcm5hbWU6<br>
2020-12-04 17:16:19 CLIENT -> SERVER: [credentials hidden]<br>
2020-12-04 17:16:19 SERVER -> CLIENT: 334 UGFzc3dvcmQ6<br>
2020-12-04 17:16:19 CLIENT -> SERVER: [credentials hidden]<br>
2020-12-04 17:16:29 SERVER -> CLIENT: 535 5.7.3 Authentication unsuccessful [DB6PR0501CA0035.eurprd05.prod.outlook.com]<br>
2020-12-04 17:16:29 SMTP ERROR: Password command failed: 535 5.7.3 Authentication unsuccessful [DB6PR0501CA0035.eurprd05.prod.outlook.com]<br>
SMTP Error: Could not authenticate.<br>
2020-12-04 17:16:29 CLIENT -> SERVER: QUIT<br>
2020-12-04 17:16:29 SERVER -> CLIENT: 221 2.0.0 Service closing transmission channel<br>
2020-12-04 17:16:29 Connection: closed<br>
SMTP Error: Could not authenticate.<br>