Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Oct 2017 10:00:17 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Paul Schmehl <pschmehl_lists@tx.rr.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Scripting problem
Message-ID:  <20171008100017.30ab5987.freebsd@edvax.de>
In-Reply-To: <8C8E7D66788801594EC0FC4C@Pauls-MacBook-Pro.local>
References:  <7AB396F429EEB6890100F082@Pauls-MacBook-Pro.local> <VI1PR02MB1200B33C1F59A223B84E9153F6770@VI1PR02MB1200.eurprd02.prod.outlook.com> <8C8E7D66788801594EC0FC4C@Pauls-MacBook-Pro.local>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 08 Oct 2017 01:14:04 -0500, Paul Schmehl wrote:
> I guess I should have pointed out that I'm sending mail on localhost, so 
> there's no auth involved. I'm using mutt because mailx doesn't appear to 
> have the ability to attach files.

You can attach files with classic mail / mailx, but you'd have
to create the headers yourself and maybe use b64encode, so your
solution really looks more comfortable.



> I solved the problem by using a one word subject. It's weird that Mutt is 
> somehow parsing the words in the subject and using them as recipients.

As I said, mutt doesn't do that. Always keep in mind that space
(or whitespace in general) is the option delimiter in sh and bash.
So when you issue

	mutt -s Foo Bar Baz [...]

the -s parameter will be "Foo" only (without the quotes). Then
mutt will receive the parameters "Bar" and "Baz" which it treats
as addresses (because there is no option switch infront of them,
so they have to be addresses, see "man mutt" for synopsis).

To deal with this problem, make the shell submit the whole string
as _one_ parameter:

	mutt -s "Foo Bar Baz" [...]

Now -s will receive "Foo Bar Baz" (without the quotes). Use double
quotes because you want shell expansion / variable evaluation.

It's not mutt's fault. :-)


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171008100017.30ab5987.freebsd>