My web provider recently changed from Ubuntu 14.04 to 18.04. This broke an automated script I use to send emails with no body, but with an attach. I shortened the code below to simplfy.
This used to work until now.
mail -a file.txt -s "Test" [email protected] < /dev/null
The body (!) outcome was: No attach!
file.txt
MIME-Version: 1.0
Content-Type: text/plain; charset="ANSI_X3.4-1968"
Content-Transfer-Encoding: 8bit
The file itself was not attached! Only the header of the encoding was apparently sent.
Next try:
uuencode file.txt file.txt | mail -s "Test" [email protected]
This time, the body (!) outcome was: No attach was shown!
begin 644 file.txt
M0D5'24XZ5D-!3$5.1$%2#0I615)324]..C(N,`T*4%)/1$E$.BTO+V=E;VAE
M:2!S;V9T=V%R92\O3D].4T=-3"!R;W-T;VEC<R\O14X-"DU%5$A/1#I054),
...
This time, the file was encoded apparently, but shown as body, not as attach.
I checked the mailbox on 2 different clients and on a webmail interface. All identical and never any attach.
mutt
(instead of mail
) also didn't generate file attaches. So I guess the problem is system related, not mail
or mutt
related.
What goes wrong here?
mutt -s "Test" -a file.txt -- [email protected] < /dev/null
. Butmail
behaviour seems different in Ubuntu 18.04 vs 14.04. Hence my question regardingmail
remains unanswered.mail
should nevertheless still be capable of sending attaches somehow. I didn't manage to convice it to send any attach by any command (-a, ...) or pipe (uuencode, ...)!