uuencode+mail发送邮件问题

cat /etc/redhat-release

CentOS Linux release 7.5.1804 (Core)

发送命令
#uuencode cc.txt cc.txt | mail -s "主题" aa@163.com < 正文.txt

邮件主题内容正常
出现问题:没有收到附件

未能解决
改用sendEmail

yum -y install sendemail

sendEmail -f 发送方邮箱 -t 接收方邮箱 -s smtp.163.com -u "邮件主题" -o message-content-type=html -o message-charset=utf8 -xu 发送方邮箱 -xp 邮箱授权码 -m "邮件正文" -a "./ceshi.txt"

正文乱码问题:

vi /usr/local/bin/sendEmail 把"message-charset" 修改为 utf-8

"message-charset" => 'utf-8'

https://www.cnblogs.com/matric/p/6792990.html