通过shell脚本发送邮件

时间:2012-06-25 05:51:56

标签: email shell command

我想通过shell脚本上的电子邮件发送一个zip文件。我知道我需要使用以下命令:

cat file.txt | mail -s "This is subject" [email]name@address.com[/email]

我总是收到这个错误:

line 13: mail: command not found

有谁知道我可以在何处以及如何安装mail命令?

我正在使用Cygwin来测试我的shell脚本。

2 个答案:

答案 0 :(得分:0)

如果你在ubuntu,你可以使用 apt

sudo apt-get install mailutils postfix

答案 1 :(得分:0)

安装"钉子"或" mailx"封装

相关问题