From owner-freebsd-questions@freebsd.org Sun Oct 8 11:17:21 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5F27E31BE2 for ; Sun, 8 Oct 2017 11:17:21 +0000 (UTC) (envelope-from baho-utot@columbus.rr.com) Received: from cdptpa-cmomta01.email.rr.com (cdptpa-outbound-snat.email.rr.com [107.14.166.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F1BA36BB41 for ; Sun, 8 Oct 2017 11:17:20 +0000 (UTC) (envelope-from baho-utot@columbus.rr.com) Received: from raspberrypi.bildanet.com ([65.186.81.207]) by cmsmtp with ESMTP id 19a2e4jE9zawl19a5eJY0t; Sun, 08 Oct 2017 11:17:13 +0000 Received: from [192.168.1.143] (helo=desktop.example.com) by raspberrypi.bildanet.com with esmtp (Exim 4.84) (envelope-from ) id 1e19a2-0007oY-Iu for freebsd-questions@freebsd.org; Sun, 08 Oct 2017 11:17:10 +0000 Subject: Re: Scripting problem To: freebsd-questions@freebsd.org References: <7AB396F429EEB6890100F082@Pauls-MacBook-Pro.local> <8C8E7D66788801594EC0FC4C@Pauls-MacBook-Pro.local> From: Baho Utot Message-ID: Date: Sun, 8 Oct 2017 07:17:10 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <8C8E7D66788801594EC0FC4C@Pauls-MacBook-Pro.local> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfGKoCzwmtJZfDgMZiUbcpc3ym+uX86LFKMrqBJPVp0plTrF/UXyNliKU4Jb4DGx2GAhI0Uc91adP4ehgI/caqLfy1QG2iEn3JoxP8b/LxSmG0OfvTsjw gsXtZXnbelvL1Y9sCI9X4y7zbyxf9JRQRG+izNguUFr+Q5YPoOvg8fgq5lOtpv5APtPRE6otoegSFxorq9UTD/+Alx0NoIv0BIY= X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Oct 2017 11:17:21 -0000 On 10/08/17 02:14, Paul Schmehl wrote: > --On October 8, 2017 at 6:08:51 AM +0000 Manish Jain > wrote: > >> >> I do not use mutt (one of the most unfriendly Unix apps) so I cannot >> comment on what is the problem here. But I would to suggest one thing to >> you for CLI mail : use the port/pkg smtp-cli >> >> Here is a working sample for mail with attachment (bundled into the bash >> shell array att) : >> >> smtp-cli \ >>     --ipv4 \ >>     --auth \ >>     --server="$SMTP" \ >>     --port=$PORT \ >>     --user="$fromaddr" \ >>     --pass="$password" \ >>     --from="$fromname <$fromaddr>" \ >>     --to="$sendto" \ >>     --subject="$subject" \ >>     "${att[@]}" >> >> If this solves your problem, good luck  : - ) >> > 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. > > 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. > In bourne shell quoting is your friend. Have a look at variable expansion.