Мне нужно прикрепить файл с mailx, но на данный момент у меня нет успеха.KornShell (ksh) код для отправки вложений с mailx и uuencode?
Вот мой код:
subject="Something happened"
to="[email protected]"
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
Любая обратная связь будет высоко оценен.
Update Я добавил крепежный вар, чтобы избежать необходимости использовать путь каждый раз.
Спасибо большое! Да, я видел, что есть mutt, который может делать простые вложения, но поскольку я не root в этом поле, мне придется иметь дело с любым хакером mailx. – 2008-09-18 20:47:11
У меня возникла следующая ошибка: uuencode: незаконный вариант - m Использование: uuencode [infile] remotefile – 2008-09-18 20:56:59