首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

应用mail命令发邮件

2012-10-17 
使用mail命令发邮件Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...[- sendmai

使用mail命令发邮件
Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...
            [- sendmail-options ...]
       mail [-iInNv] -f [name]
       mail [-iInNv] [-u user]
使用管道最为简单,如
echo "This is first email send by shell" |mail -s "first email shell" ***@**.com
-s后面的"first email shell"为该邮件主题
"This is first email send by shell",为该邮件正文

还有一种方法,麻烦些:
首先mail -s "first email shell" ***@**.com,打回车,进入正文编辑
"This is first email send by shell",编写完正文,CTRL+D结束输入,如果需要抄送邮件,后面写入要抄送的邮件地址,否则,直接回车就Ok。

热点排行
Bad Request.