Well, as it turns out to be the case spookily often, I figured it
out minutes after I posted this. In case anybody might be interested:
I created a file named .mailrc in the home directory for the user
who is going to be sending the emails, with the following contents in
this file:
# Testing syntax:
# echo "Testing, Testing, Testing" | mailx -s "My test..."
#
add...@whatever.com
# Use v15.0 compatibility mode
set v15-compat
# See the whole process, especially for troubleshooting:
set verbose
# Essential setting: select allowed character sets
set sendcharsets=utf-8,iso-8859-1
# and reply in the same charset used by sender:
set reply-in-same-charset
# Default directory where we act in (relative to $HOME)
set folder=mail
# You actual address to reply to:
set from="
myn...@myaddress.com"
# Request strict TLS transport layer security checks
# set tls-verify=strict
# set tls-ca-file=/etc/ssl/certs/ca-certificates.crt
# set tls-ca-no-defaults
# Alternative, don't do SMTP server certificate verification
set tls-verify=ignore
set smtp-use-starttls
set smtp-auth=login
# When sending messages, wait until the Mail-Transfer-Agent finishes.
# Only like this you will be able to see errors reported through the
# exit status of the MTA (including the built-in SMTP one)!
set sendwait
# And of course put your own username and password here in the obvious
# places:
set mta=smtps://USERNAME:PASS...@SMTP.SERVER:465
With this, a simple invocation as mentioned at the top of the
file sends the email as expected. In my case, I disable TLS security
checks because I know what the SMTP server that will be connecting to is,
and that's the only server that I will be using here. All this suffices
to fulfill my needs.