linux mail <file.log ma Content-Type: application / octet-stream (noname załącznik w Gmailu)
Używam
<code> mail -s "here is a log file" "[email protected]" < log/logfile.log </code>
Które kiedyś przychodziły z nagłówkami:
<code>User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit </code>
Ale teraz pliki są dłuższe Otrzymuję noname załączniki, ponieważ dzięki temu:
<code>User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: application/octet-stream Content-Transfer-Encoding: base64 </code>
Więc jeśli wszystko inne zawiedzie, sprawdź instrukcjęman mail
...
<code>NAME mailx - send and receive Internet mail SYNOPSIS mailx [-BDdEFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr] [-r from-addr] [-h hops] [-A account] [-S variable[=value]] to-addr . . . </code>
Żadna z tych opcji nie wydaje się użyteczna, więc jak mogę wymusićContent-Type: text/plain
?