Shell脚本发送电子邮件 [英] Shell script to send email
本文介绍了Shell脚本发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以吗?
如果是这样,shell脚本如何发送邮件?
请提供一个代码段来开始。
解决方案
是的,它可以正常工作,常用:
$ echohello world| mail -s主题someone@somewhere.com
I am on linux machine and I monitor a process usage. Most of the time I will be away from my system and I have access to internet on my device. So I planned to write a shell-script that can mail me the output of the process.
Is it possible?
If so how to make a shell-script send me mail?
Please provide a snippet to get started.
解决方案
Yes it works fine and is commonly used:
$ echo "hello world" | mail -s "a subject" someone@somewhere.com
这篇关于Shell脚本发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文