Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Oct 2017 10:19:11 -0600
From:      markham breitbach <markham@ssimicro.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Scripting problem
Message-ID:  <f6d054ba-0247-bc17-32d2-ad1d160f5577@ssimicro.com>
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
The easiest way to attach files in mailx is to use uuencode.

something like this:

dbdump.sh | uuencode dbdump.sql=A0 | mail -s "DB backup for today"
myemail@example.com

-M

On 2017-10-08 12:14 AM, Paul Schmehl wrote:
> --On October 8, 2017 at 6:08:51 AM +0000 Manish Jain
> <bourne.identity@hotmail.com> 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 ba=
sh
>> shell array att) :
>>
>> smtp-cli \
>> =A0=A0=A0=A0--ipv4 \
>> =A0=A0=A0=A0--auth \
>> =A0=A0=A0=A0--server=3D"$SMTP" \
>> =A0=A0=A0=A0--port=3D$PORT \
>> =A0=A0=A0=A0--user=3D"$fromaddr" \
>> =A0=A0=A0=A0--pass=3D"$password" \
>> =A0=A0=A0=A0--from=3D"$fromname <$fromaddr>" \
>> =A0=A0=A0=A0--to=3D"$sendto" \
>> =A0=A0=A0=A0--subject=3D"$subject" \
>> =A0=A0=A0=A0"${att[@]}"
>>
>> If this solves your problem, good luck=A0 : - )
>>
> 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 recipient=
s.
>
> Paul Schmehl, Retired
> As if it wasn't already obvious, my opinions
> are my own and not those of my employer.
> *******************************************
> "It is as useless to argue with those who have
> renounced the use of reason as to administer
> medication to the dead." Thomas Jefferson
> "There are some ideas so wrong that only a very
> intelligent person could believe in them." George Orwell
>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe@freebsd.org"





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f6d054ba-0247-bc17-32d2-ad1d160f5577>