Send to a Listing

Wim factotum_muth at web.de
Sat Apr 13 17:20:27 UTC 2019


Hi,

On Monday, 08 April at 21:38, Software Info wrote:

> Hi All
> Each day I get a text file with a bunch of email addresses. I would like to send out a standard message to all email addresses in this file. Is there any way Mutt allows me to do this with a command? I would later like to write a script to include this command later on.
>

Given an 'address_list' file:

==========================
mary at something.org
senna at anaddress.org
boo at somewhere.uk
and so on
==========================

and a 'standard_message' file:

=========================
Hi,

this is a test

Bye Joe
========================

You can write a script 'test.sh' which calls on mutt to send the
'standard_message' to all on the 'address_list':

=======================
#!/bin/bash

# Usage: ./test.sh address_list 'the title' standard_message

for address in `cat "$1"`
do
        neomutt -s "$2" -- $address < $3
done
======================

It might be neccessary to change neomutt to mutt. The 'test.sh' must be
made executable. And no I'm not a bash programmer but the above set up
does work.

--
All the best Wim
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,4-  ) )-,_. ,\ (  `'-'
    '---''(_/--'  `-'\_)
-------------- next part --------------
mary at something.org
senna at anaddress.org
boo at somewhere.uk
and so on
-------------- next part --------------
Hi,

this is a test

Bye Joe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.sh
Type: application/x-sh
Size: 150 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20190413/5454e50e/attachment.sh>


More information about the Mutt-users mailing list