Snowman
Snowman

Reputation: 73

mutt send email to variable list from file

I setup mutt and msmtp to send email via my google account. Another script have a variable status.txt output like this:

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

How could I send email to this list, with status.txt content as body ? Something like this:

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

Thanks!

Upvotes: 0

Views: 629

Answers (1)

Snowman
Snowman

Reputation: 73

I found that this code worked for me:

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

thanks for all!

Upvotes: 1

Related Questions