有以下几种方法
1)
cat /root/crontabdirectory/notice.txt | mail -s "shipingzhong"
958186957@qq.com2)
mail -s "shipingzhong"
958186957@qq.com < /root/crontabdirectory/notice.txt
3) mail -s "shipingzhong"
958186957@qq.com <<< "aaaaaaaaaa"
4) 这个写在shell脚本里 然后 ./shell脚本文件名
#!/bin/sh
content=$(cat /root/crontabdirectory/notice.txt)
mail -s "shipingzhong"
958186957@qq.com <<< "$content"