<<< Date Index >>>     <<< Thread Index >>>

Re: mutt question



On Mon, Jul 12, 2004 at 11:49:21AM -0400, Theisen, James E 
<james.e.theisen@xxxxxxxx> wrote:
Hello:

This should really have gone to mutt-users

Using mutt in an automated (Linux) process to send out event notifications. All is well except that I see confusion between who is "To:" and who is "cc:". Here's a piece of the script:

        export user1="user1@xxxxxxxxxxxxx"
        export user2="user2@xxxxxxxxxxxxx"    
        export user3="user3@xxxxxxxxxxxxx"
        export user4="user4@xxxxxxxxxxxxx"    
        export distribution-list="${user2} ${user3}"
                .
                .
        mutt -s"subject-text" \
        -apath/attachment.file  \
        ${user1}  admin<path/message-body.txt        \
        -c${distribution-list}  \
        -c${user4}

Try quoting your shell variable.  That is, like:

        mutt -s"subject-text" \
        -apath/attachment.file  \
        ${user1}  admin<path/message-body.txt        \
        "-c${distribution-list}"      \
        -c${user4}

I think otherwise -c${distribution-list} is being treated by the shell
as separate arguments, "-cuser2@xxxxxxxxxxxxx" and
"user3@xxxxxxxxxxxxx".

All the mail gets to all the addressees but:
                The To: addressees are:   ${user1} admin ${user3)       #user3 
is the tail-end of the distribution-list
                The cc: addressees are:   ${user2} and ${user4}         #user2 
is the first element of the distribution-list

Seems like only the first element in the distribution-list gets cc:, the rest go to To:

--
Bob Bell <bbell@xxxxxxxxxxxxxxxxxxxxx>