Hiya, i'm new here and new to Zorin. Beautiful UI btw.
This issue has prompted me to sign up.
I'm trying to set up a fresh install of Zorin to do some tasks each week, and then email me a report. I've set this up successfully in the past on Mint (21.3) and on Ubuntu (24.04). I can get the email to work, but not completely. It can't send an attachment. I also had to employ a different syntax. Basically, mailx on Zorin does not understand -A
and -a
doesn't work to attach files to the email. It does on Ubuntu and Mint.
So i went-a-huntin' for information and it seems there's different implementations of mailx out there. But that said, both Mint and Zorin are based on Ubuntu, and i've installed the mailutils package the same way: sudo apt install mailutils
.
This guy had a similar problem, sadly no actual solutions were offered: email - Difference between mail and mailx? - Unix & Linux Stack Exchange
I tried to invoke the help, and it has a problem on Zorin:
$ mailx --help
mailx: invalid option -- '-'
usage: mailx [-dEIinv] [-a header] [-b bcc-addr] [-c cc-addr] [-r from-addr] [-s subject] [--] to-addr ...
mailx [-dEIiNnv] -f [name]
mailx [-dEIiNnv] [-u user]
vs
Ubuntu (or Mint):
$ mailx --help
Usage: mailx [OPTION...] [address...]
or: mailx [OPTION...] [OPTION...] [file]
or: mailx [OPTION...] --file [OPTION...] [file]
or: mailx [OPTION...] --file=file [OPTION...]
GNU mail -- process mail messages.
If -f or --file is given, mail operates on the mailbox named by the first
argument, or the user's mbox, if no argument given.
-A, --attach=FILE attach FILE
-a, --append=HEADER: VALUE append given header to the message being sent
--[no-]alternative force multipart/alternative content type
--attach-fd=FD attach from file descriptor FD
--content-filename=NAME
set the Content-Disposition filename parameter for
the next --attach option
--content-name=NAME set the Content-Type name parameter for the next
--attach option
--content-type=TYPE set content type for subsequent --attach options
-E, --exec=COMMAND execute COMMAND
-e, --exist return true if mail exists
--encoding=NAME set encoding for subsequent --attach options
-F, --byname save messages according to sender
-H, --headers write a header summary and exit
-i, --ignore ignore interrupts
-M, --[no-]mime compose MIME messages
-N, --nosum do not display initial header summary
-n, --norc do not read the system mailrc file
-p, --print, --read print all mail to standard output
-q, --quit cause interrupts to terminate program
-r, --return-address=ADDRESS
use address as the return address when sending
mail
-s, --subject=SUBJ send a message with the given SUBJECT
--[no-]skip-empty-attachments
skip attachments with empty body
-t, --to read recipients from the message header
-u, --user=USER operate on USER's mailbox
Global debugging settings
--debug-level=LEVEL set Mailutils debugging level
--[no-]debug-line-info show source info with debugging messages
Configuration handling
--config-file=FILE load this configuration file; implies --no-config
--config-lint check configuration file syntax and exit
--config-verbose verbosely log parsing of the configuration files
--no-config do not load site and user configuration files
--no-site-config do not load site-wide configuration file
--no-user-config do not load user configuration file
--set=PARAM=VALUE set configuration parameter
Informational options
--config-help show configuration file summary
--show-config-options show compilation options
-?, --help give this help list
--usage give a short usage message
-V, --version print program version
Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
Report bugs to <bug-mailutils@gnu.org>.
GNU Mailutils home page: <http://mailutils.org>
General help using GNU software: <http://www.gnu.org/gethelp/>
Zorin uses an older version of mailutils vs my Ubuntu 24.04, but Mint's version is older too. 3.17 is the latest. So i screwed around, not really knowing what i'm doing and i managed to get 3.17 installed on Zorin:
sudo apt install mailutils
mailutils is already the newest version (1:3.17-1.1build3).
Don't worry, this is currently on a VM while i work out how to do things in Zorin - i really didn't expect it to be much different to Mint under the hood. Sadly my janky efforts didn't make a difference. Exactly the same situation.
I'm at a loss. I've invested a fair bit of time and effort into my scripts that make use of mailx, so i'd rather not change them if i don't have to.
I'd love some ideas Thanks.