I code on an iSeries with CL/RPGLE. Our email program needs to connect and send mail using MS O365 accounts and the TLS protocol for security reasons with port 587.
Our email program needs to connect and send mail using MS O365 accounts and the TLS protocol for security reasons with port 587. For testing, I used TELNET to the O365 STMP server using port 587, the EHLO command and starting TLS using the STARTTLS command but that is far as I can get. After that, anything I do just sits there and no more responses from the server. I am trying to figure login commands at this point, which I researched from Google but didn't seem to work, much less anything else. A set of connection rules I found about TLS here on Code Project is the list below. Please see screenshots links at the bottom of post of what the TELNET session looks like. Any help would be very appreciated. Thanks!
1. The client connects to the server using TCP.
2. The server sends a welcome message using the un-encrypted connection to the client.
3. The client sends a EHLO command using the un-encrypted connection to the server.
4. The server responds to the EHLO command using the un-encrypted connection.
5. The client sends a STARTTLS command using the un-encrypted connection to the server.
6. The server responds to the STARTTLS command using the un-encrypted connection.
7. The client negotiates an encrypted connection with the server.
8. The client sends a EHLO command using the encrypted connection to the server.
9. The server responds to the EHLO command using the encrypted connection.
A) This first image is how I TELNET to email server for testing purposes. In the program, we use SMTP sockets to do the same thing:
B) This next one is a normal SMTP screen using port 25 (NO TLS) and connects successfully:
C) Last screenshot is my TELNET attempt to TLS protocol in which I am stuck on what to do next after successfully starting the TLS sever:
Our email program needs to connect and send mail using MS O365 accounts and the TLS protocol for security reasons with port 587. For testing, I used TELNET to the O365 STMP server using port 587, the EHLO command and starting TLS using the STARTTLS command but that is far as I can get. After that, anything I do just sits there and no more responses from the server. I am trying to figure login commands at this point, which I researched from Google but didn't seem to work, much less anything else. A set of connection rules I found about TLS here on Code Project is the list below. Please see screenshots links at the bottom of post of what the TELNET session looks like. Any help would be very appreciated. Thanks!
1. The client connects to the server using TCP.
2. The server sends a welcome message using the un-encrypted connection to the client.
3. The client sends a EHLO command using the un-encrypted connection to the server.
4. The server responds to the EHLO command using the un-encrypted connection.
5. The client sends a STARTTLS command using the un-encrypted connection to the server.
6. The server responds to the STARTTLS command using the un-encrypted connection.
7. The client negotiates an encrypted connection with the server.
8. The client sends a EHLO command using the encrypted connection to the server.
9. The server responds to the EHLO command using the encrypted connection.
A) This first image is how I TELNET to email server for testing purposes. In the program, we use SMTP sockets to do the same thing:
B) This next one is a normal SMTP screen using port 25 (NO TLS) and connects successfully:
C) Last screenshot is my TELNET attempt to TLS protocol in which I am stuck on what to do next after successfully starting the TLS sever:
Comment