Re: MUTT file attachments are mandatory?
Well then. That's what I needed to see! I am not a script expert, so
your solution is amicable. What language? Unix? That's not a language.
Ahhhh C-shell. Thanks!
-----Original Message-----
From: jack@xxxxxxxxxxxx [mailto:jack@xxxxxxxxxxxx]
Sent: Tuesday, 12 December 2006 9:13 AM
To: mutt-users@xxxxxxxx
Subject: Re: MUTT file attachments are mandatory?
* fernando.olmos@xxxxxxxxxx <fernando.olmos@xxxxxxxxxx> [061211 22:03]:
> I already solved it, like you said, by testing the existence of the
> file before running MUTT. However, due to the nature of the reports
> that I need to attach this means IF THEN ELSE on every report, which
> means a lot of overheads with MUTT commands all over the shop. It
> would have been nice for MUTT to treat the '-a' switch as optional and
> I hence I would have only ONE command line for all my reports.
Why build this functionality into mutt, though? I don't know what
language you are calling this from, but in shell script it's as simple
as something like (not tested)
#!/bin/bash
LIST=
for i in file1 file2
do
[ -f $i ] && LIST="$LIST -a $i"
done
mutt recipient -s 'blah' $LIST < /dev/null
j
**********************************************************************
IMPORTANT
The contents of this e-mail and its attachments are confidential and intended
solely for the use of the individual or entity to whom they are addressed. If
you received this e-mail in error, please notify the HPA Postmaster,
postmaster@xxxxxxxxxx,
then delete the e-mail.
This footnote also confirms that this e-mail message has been swept for the
presence of computer viruses by Ironport. Before opening or using any
attachments, check them for viruses and defects.
Our liability is limited to resupplying any affected attachments.
HPA collects personal information to provide and market our services. For more
information about use, disclosure and access see our Privacy Policy at
www.hpa.com.au
**********************************************************************