mutt将电子邮件发送到文件中的变量列表

问题描述:

我设置了mutt和msmtp通过我的Google帐户发送电子邮件。 另一个脚本具有可变status.txt输出是这样的:mutt将电子邮件发送到文件中的变量列表

[email protected] 
[email protected] 
[email protected] 

我怎么能发送邮件到该列表中status.txt内容的身体吗? 类似这样的:

mutt -s 'my list' $listemail < /pathto/status.txt 

谢谢!

+0

'$ listemail'包含什么?什么是不工作在这里? – Inian

+0

请参阅[这里](http://stackoverflow.com/questions/42162615/bash-for-loop-syntax)如何编写'for'循环。 – ceving

+0

listemail =我的电子邮件列表= status.txt包含 – Snowman

我发现这个代码为我工作:

while read line 
do mutt $line -s 'subject-mylist' < /pahthto/status.txt 
done < /pathto/listemails.txt 

感谢所有!