mailxでファイルを添付する必要がありますが、現時点では成功していません。
これが私のコードです:
subject="Something happened"
to="somebody@somewhere.com"
body="Attachment Test"
attachment=/path/to/somefile.csv
uuencode $attachment | mailx -s "$subject" "$to" << EOF
The message is ready to be sent with the following file or link attachments:
somefile.csv
Note: To protect against computer viruses, e-mail programs may prevent
sending or receiving certain types of file attachments. Check your
e-mail security settings to determine how attachments are handled.
EOF
フィードバックをいただければ幸いです。
更新 毎回パスを使用する必要がないように、添付ファイル変数を追加しました。