Closed hydrosine closed 7 years ago
What software do you use for it? I have heirloom mailx v12.5, and -a attaches a file:
-a file Attach the given file to the message.
I guess it depends on your mail software implementation.
I used the ubuntu mailutils package.
Missed the message about heirloom mailx!
mail -V
mail (GNU Mailutils) 2.99.98
Copyright (C) 2010 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.
I don't use that one so cannot tell much, but as I said, it likely depends on implementation, as these are two different packages. The script uses Heirloom-mailx, so -a is correct from that point of view. If you use some other software, just modify the script appropriately.
Thanks, edited the title so it reflects the error.
Hi,
In the scripts you use -a in the mail commands to attach the logfile. This does not function and results in an error that an invalid header is being added to the mail.
Looking in the documentation for the mail command, -a is used for adding headers, while -A is used for attaching files.