[NTLUG:Discuss] Mail merge?

Richard Geoffrion ntlug at rain4us.net
Tue Jul 3 19:14:31 CDT 2007


Lance Simmons wrote:
> Thanks for everyone's advice on how to pare down a large list of email
> addresses.  Now I have a nice, neat list.
>
> Now I need to figure out how to send the same email to each of these
> addresses.  I've used mutt for a long time (though I've switched
> mostly to gmail recently), but can't seem to find how to do it in
> mutt.  Surely this is a common task: large list of emails, need to
> send an email to each person.  Also, I'm using smtp.gmail.com as my
> smarthost, so I probably need to send them out pretty slow over a
> period of time, so as not to get blocked as spam.
>
> We're talking about something like 500 addresses.  Any suggestions?
>
>   

There are a bazillion ways to do things, but one way COULD be to use 
nail/mail/(pick your mailer)....

#!/bin/bash
#read in a file LINE by line(address by address)
while read LINE ; do
    #cat the file through mail (enter your own options as needed)
    #and send to the current recipient($LINE)
    cat FILE_WITH_EMAIL_TEXT | mail -s "Subject here" $LINE
    sleep 120 #sleep for a while to pace yourself
done < FILE_WITH_ADDRESSES #pump the file with addys into the do-loop


-- 
Richard



More information about the Discuss mailing list