[neomutt-users] Send mail from command line (no ncurses interface, exit immediately)

Rieger Anton nmutt at jikken.de
Tue Aug 21 16:33:53 CEST 2018


On Tue, Aug 21, 2018 at 02:57:09PM +0200, Valentin Iovene wrote:
>On 21.08.2018 10:42, Valentin Iovene wrote:
>> #!/usr/bin/env bash
>> neomutt \
>>   -B \
>>   -e "set from = tgy at work.com" \
>>   -d 5 \
>>   -s "print on `date`" \
>>   -a $@ \
>>   -- network-printer at work.com
>
>Did not mean to include the -B (bulk) option. This effectively silences
>the program but no email is sent. This is probably not at all what I'm
>looking for!
>
>-- 
>Valentin Iovene

I'm using the -x switch as follows, as my scripts used mail(x) earlier:

neomutt -x -s "Subject" -- myemail at example.org < body.txt

As you're using bash, you could silence the body with:

neomutt -x -s "Subject" -- myemail at example.org <<< ""


More information about the neomutt-users mailing list