#!/bin/bash
server="192.168.1.1 25"
s=中文標題
helo=localhost.local
mailfrom=u@b.local
mailto=u@a.local
s=$(echo -n ${s}|base64);
cat <<EOF |nc ${server}
HELO $helo
MAIL FROM:${mailfrom}
RCPT TO:${mailto}
DATA
Date: Thu, 28 Jan 2021 12:02:41 +0800
From: ${mailfrom}
To: ${mailto}
Subject:=?UTF-8?B?${s}?=
Content-Type: text/plain; charset=utf-8
中文輸入沒有問題
中文輸入沒有問題
.
QUIT
EOF
# date -R