'Mail command - change filename when is attached
I'm trying to send a mail with an attached file. I'm using mailutils to send mail. The command I use is the following:
mail -s "Hello World!" -r "[email protected]" "[email protected]" -a cc:"[email protected]" -A "/opt/app/whatsup.txt" --encoding=base64 -A "/opt/app/hello-world.txt" --encoding=base64 <<< "Hello World 122345"
For the file, I have to indicate the path from where to get it, for example I'll use /opt/app. The mail is sent successfully. However, upon review, I am surprised to find that the file is named after its local location. I have to tell it its folder because if I don't, the command recognizes it as being at the root address
Is there a way to change the name of the file without having to remove its location from where to send it?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

