<p>
Connect to port 443 and send some HTTP signals:
</p>

<pre><code>
$ openssl s_client -connect example.com:443
    [...snip...]
    Verify return code: 0 (ok)
    Extended master secret: no
    Max Early Data: 0
---
</code></pre>

<p>
You're now connected. If you wait too long, your connection will likely time out.
View the default landing page of the site you've connected with:
</p>

<pre><code>
GET / HTTP/1.1
HOST: example.com
</code></pre>

<p>
In return, you get a dump of the HTML source of the default page (usually <code>index.html</code>) in your terminal.
</p>

<p>
You can also use OpenSSL s_client for email servers using SSL.
Before you can send credentials, you must encode your email username and passphrase into Base64. The easiest method I know is this Perl one-liner:
</p>

<pre><code>
$ perl -MMIME::Base64 -e 'print encode_base64("myUserName");'
$ perl -MMIME::Base64 -e 'print encode_base64("myPassPhrase");'
</code></pre>

<p>
Take note of the results.
</p>

<p>
The s_client session, aside from authentication, is basically the same as a telnet session. You can find <a href="https://www.redhat.com/sysadmin/telnet-troubleshoot-mail-system" target="_blank">good telnet tutorials all over the Internet</a>, and aside from sending your credentials, they apply to s_client.
</p>

<p>
Here's a copy-paste of an example session:
</p>

<pre><code>
$ openssl s_client -starttls smtp -connect email.example.com:587
&#62; ehlo example.com
&#62; auth login
&#35;&#35;paste your user base64 string here&#35;&#35;&#35;&#35;
&#35;&#35;paste your password base64 string here&#35;&#35;&#35;&#35;

&#62; mail from: noreply@example.com
&#62; rcpt to: admin@example.com
&#62; data
&#62; Subject: Test 001
This is a test email.
.
&#62; quit
</code></pre>
