mailxを使用して(内容を変更する代わりに)ファイルを正しく追加するには?

mailxを使用して(内容を変更する代わりに)ファイルを正しく追加するには?

使っています

$ mailx -V
mailx (GNU Mailutils) 3.5
Copyright (C) 2007-2017 Free Software Foundation, inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ echo test | mailx -s Testmessage user -A /tmp/test.png

Debian ブレーカーズで。ただし、電子メールクライアント(Thunderbird、Apple Mailなど)には添付画像のみが表示されますtextいいえ現れる!ソースを見ると、次のメッセージが表示されます。

--385425503-1612411894=:25669
Content-Type: text/plain; charset=UTF-8
Content-Disposition: attachment
Content-Transfer-Encoding: 8bit
Content-ID: <20210204051134.25669.1@localhost>

test

--385425503-1612411894=:25669
Content-Type: application/octet-stream; name="test.png"
Content-Disposition: attachment; filename="/tmp/test.png"
Content-Transfer-Encoding: base64
Content-ID: <20210204051134.25669.1@localhost>

iVBORw0KGgoAAAANSUhEUgAABVYAAAK2CAYAAACl2sceAAAgAElEQVR4nOzdeXRUhcH/f9t6WtvH
[...]

私は遊ん--alternativeだが、動作するオプションが見つかりませ--content-typeん。-M

ベストアンサー1

おすすめ記事