linux shell发送带附件的邮件
2015-09-25 10:55
399 查看
转自:http://www.cnblogs.com/pony/archive/2007/12/19/1006050.html
如果没有正文文件的话,就用echo直接把正文打出来就行了,如:
echo "this is content" | mutt -s "this is subject" -a /path/yourfile abc@local.domain -c bbb@local.domain
如果有正文文件的话就用
cat /path/contentfile | mutt -s "this is subject" -a /path/yourfile abc@local.domain -c bbb@local.domain
mutt是linux下一个强大的邮件客户端软件.
-s是主题
-a是附件
-c是抄送,多个抄送就是多个-c,如
cat /path/contentfile | mutt -s "this is subject" -a /path/yourfile abc@local.domain -c bbb@local.domain -c ccc@local.domain -cddd@local.domain
如果发送多个email,就直接列出来就行了,如
cat /path/contentfile | mutt -s "this is subject" -a /path/yourfile abc@local.domain bbb@local.domain ccc@local.domainddd@local.domain
如果没有正文文件的话,就用echo直接把正文打出来就行了,如:
echo "this is content" | mutt -s "this is subject" -a /path/yourfile abc@local.domain -c bbb@local.domain
如果有正文文件的话就用
cat /path/contentfile | mutt -s "this is subject" -a /path/yourfile abc@local.domain -c bbb@local.domain
mutt是linux下一个强大的邮件客户端软件.
-s是主题
-a是附件
-c是抄送,多个抄送就是多个-c,如
cat /path/contentfile | mutt -s "this is subject" -a /path/yourfile abc@local.domain -c bbb@local.domain -c ccc@local.domain -cddd@local.domain
如果发送多个email,就直接列出来就行了,如
cat /path/contentfile | mutt -s "this is subject" -a /path/yourfile abc@local.domain bbb@local.domain ccc@local.domainddd@local.domain
相关文章推荐
- shell mkfifo 阻塞式管道
- linux shell脚本攻略总结(二)
- 粗浅的增量代码上线shell脚本--菜鸟版
- 如何用 Bash 创建一个二进制发布包
- linux学习之shell练习
- linux shell
- shell脚本作业
- 排序算法三:Shell插入排序
- bash脚本中的典型例子
- linux学习之shell的流程控制
- shell脚本学习 一
- linux c语言实现 执行shell命令
- Shell编程(1)
- 解决因特网和xshell考虑到问题
- linux常用命令 和shell脚本(必知)
- ubuntu中shell判断文件存在
- command not found 4000 : shopt linux 配置./bashrc 错误
- 通过shell找到唯一的tomcat PID
- shell脚本编程-检查和测试
- Shell