On Wed, 31 Jan 2024, Reid wrote:

I don't know about `mailx -S`, but you could put a placeholder in your msg
file like "Hi NAME_GOES_HERE". Then something like:

#!/bin/sh

while read addr <&3 && read name <&4; do
   sed "s/NAME_GOES_HERE/$name" msg | mailx -s "subject here" $addr
done 3</tmp/addrs.txt 4</tmp/names.txt

May need some tweaking, haven't tested with mailx.

Reid,

This looks promising. I was stuck on a placeholder at the top of the message
and putting the right name with the right address since both input files are
in the same sequence.

Thanks,

Rich


Reply via email to