On 2/10/25 12:19, Dianne Skoll via linux wrote:
On Mon, 10 Feb 2025 11:38:43 -0500
Tug Williams <[email protected]> wrote:
echo -e "Subject:midnight report for $reportDate\n$(cat $targetFile)"
| sendmail -f "[email protected]" -t "[email protected]"
You can also use mail, which on Debian is packaged in
mailutils.
mail -s "Midnight report for $reportDate" \
-r [email protected] [email protected] < $targetFile
which is probably safer than catting some random file and having "echo -e"
process escape sequences.
Internally, mail invokes sendmail for you, so you get the nice queueing
behaviour.
I had seen mailutils, but it is described as "A useful collection of
mail servers, clients, and filters", so seemed a bit of a heavy solution
for the one feature I was looking for.
I also looked at swaks (Swiss Army Knife SMTP; Command line SMTP
testing, including TLS and AUTH), again seemed a bit heavy.
The sendEmail source site seems unavailable, and is not actively
maintained for gentoo.
I installed mailutils, and that works, and has a gentoo maintainer, so
I'll stick with that.
Thank you
Tug
To unsubscribe send a blank message to [email protected]
To get help send a blank message to [email protected]
To visit the archives: https://lists.linux-ottawa.org