Send email via openssl command line

root@localhost$ openssl s_client -crlf -quiet -starttls smtp -connect mail.server.com:465
depth=0 OU = GT85507400, OU = See www.rapidssl.com/resources/cps (c)14, OU = Domain Control Validated - RapidSSL(R), CN = *.name.com
verify ...
250 HELP
> EHLO client.com
250-mail.server.com Hello client.com [192.168.1.2]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250 HELP
> AUTH LOGIN
334 VXNlcm5hbWU6
> [base64 code of username]
334 UGFzc3dvcmQ6
> [base64 code of password]
235 Authentication succeeded
> MAIL FROM:support@server.com
250 OK
> RCPT TO:yang@client.com
250 Accepted
> DATA
354 Enter message, ending with "." on a line by itself
> Subject:mail sending with mail.server.com
> This is a test mail from mail.server.com, sent by openssl.
> .
250 OK id=1YGmlz-0049vF-0V
> quit
221 mail.server.com closing connection

> 开始的行是客户端需要输入的命令。