LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   creating a mailing list (https://www.linuxquestions.org/questions/linux-newbie-8/creating-a-mailing-list-702988/)

muserob 02-07-2009 01:09 PM

creating a mailing list
 
Hi, I work with mailing a lot of emails to a lot of clients, the current emailing list I have been using has been banned by the company, because it does not leave annonimity to clients, is there a way i can create a mailing list where i can send the bulk of emails to only one of the client each, with out repeating the whole procedure over and over again.

please advise...

colucix 02-07-2009 02:16 PM

If you mean to send e-mail from the command line, just put e-mail addresses in a text file, one for each line. Then use a for loop, e.g
Code:

while read email
do
  (
  echo "From: Me <user@domain>"
  echo "To: John Smith <$email>"
  echo "Subject: Test mail"
  echo "MIME-Version: 1.0"
  echo "Content-Type: text/html"
  echo "Content-Disposition: inline"
  echo Greetings\!
  ) | /usr/sbin/sendmail $email
done < mailing_list



All times are GMT -5. The time now is 08:14 AM.