debian下安装
aptitude install heirloom-mailx
配置文件是
/etc/nail.rc
配置默认服务器
set [email protected]
set smtp=smtps://smtp.qq.com:465
set [email protected]
set smtp-auth-password=password
可选服务器配置
account accountname {
set [email protected]
set smtp=smtp://smtp.163.com:25
set [email protected]
set smtp-auth-password=password
}
用管道符直接发送
echo “neirong” | mail -s “主题” [email protected]
用Enter.Enter发送
mail -s “主题” [email protected]
发送时显示详细信息
mail -v -s “主题” [email protected]
带附件发送
mail -v -a /path/filename -s “主题” [email protected]
用指定账号发邮件
mail -A accountname -v -a /path/filename -s “主题” [email protected]
——— <文章结束> ———