Re: [Evolution] Setting the sender account for a mail composer window started from the command line



On Thu, 2020-03-05 at 16:27 +0100, Andre Klapper wrote:
I'm about to send out a good bunch of emails, and I need to find a way
to somehow semi-automate that.


I know this is an Evo list, but whenever I've done something like this
I talk to sendmail (or whatever) directly. I have a script such as:

   #!/bin/csh
   foreach i (`cat $1`)
   echo $i
   echo "To: "$i | cat - content > tmpxx
   /usr/sbin/sendmail -f "gunge@x.x" -t < tmpxx
   rm -f tmpxx
   sleep 1
   end

Which takes a bunch of addresses in a file and sends an email to each
one individually. The file "content" is the email minus the "To: "
header, but including all the necessary ones like From:, Date:,
Subject: - you should also probably have a couple of others as well.
Critically, sendmail adds the unique message-id itself.

This was the last "content" file I used (suitably sanitized):

   From: "A Person" <a.person@x.x>
   Date: Sat, 24 Feb 2018 23:27:37 +0000
   Subject: Hello
   User-Agent: Heirloom mailx 12.5 7/5/10
   MIME-Version: 1.0
   Content-Type: text/plain; charset=utf-8
   Content-Transfer-Encoding: 8bit

   Hello everyone,

The script needs to run as a user that can change the sender in
sendmail (usually root), and I put the sleep in to stop mailers
thinking I'm spamming.

P.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]