TSL support rather then SSL

Hi,

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?

Peter Broekman

please see similar question here

TLS support in mailer

Do you use NodeJs or PHP?

Hi I use PHP

I see, the PHP mailer library doesn’t support TLS at this moment and requires a big update. Will see what I can do.

1 Like

ok at least helps me in understanding it. Does NodeJs do? Guess that will take me a big update :slight_smile:

The library used by NodeJs supports TLS, but we need a small update to make it work within Wappler.

ok, tnx appreciate an update on the tls update(s). Thanks for now.

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, tried that only in php where it failed, but that’s logic looking at your first reaction (php needs an update).

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.

If you use Laragon you can set to use server default and use Laragon’s built in mailer. :blush:

1 Like

Looking forward to this update. :pray:

Tnx great tip!!

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

Yes, PHP does support StartTLS now with the new mailer component.

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:

Uncheck the Use SSL, it will use STARTTLS automatically if the server features it. Server should advertise that it supports it.

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 (  &#039;ssl&#039; =&gt;   array (    &#039;verify_peer&#039; =&gt; false,    &#039;verify_peer_name&#039; =&gt; false,    &#039;allow_self_signed&#039; =&gt; true,  ),)<br>
2020-12-04 17:16:19 Connection: opened<br>
2020-12-04 17:16:19 SERVER -&gt; 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 -&gt; SERVER: EHLO 192.168.1.16<br>
2020-12-04 17:16:19 SERVER -&gt; 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 -&gt; SERVER: STARTTLS<br>
2020-12-04 17:16:19 SERVER -&gt; CLIENT: 220 2.0.0 SMTP server ready<br>
2020-12-04 17:16:19 CLIENT -&gt; SERVER: EHLO 192.168.1.16<br>
2020-12-04 17:16:19 SERVER -&gt; 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 -&gt; SERVER: AUTH LOGIN<br>
2020-12-04 17:16:19 SERVER -&gt; CLIENT: 334 VXNlcm5hbWU6<br>
2020-12-04 17:16:19 CLIENT -&gt; SERVER: [credentials hidden]<br>
2020-12-04 17:16:19 SERVER -&gt; CLIENT: 334 UGFzc3dvcmQ6<br>
2020-12-04 17:16:19 CLIENT -&gt; SERVER: [credentials hidden]<br>
2020-12-04 17:16:29 SERVER -&gt; 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 -&gt; SERVER: QUIT<br>
2020-12-04 17:16:29 SERVER -&gt; 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>