$ mail -s test < /path/to/mail/content/file To pick mail body from a file, use the following command: You can also attach CC: and other headers using it. $ echo "hello" | mail -s test that -a is used to attach headers and can be repeated multiple times. To send email with a specific subject and piping mail body content: Sending mail with specific “from email” and subject Ii mailutils 1:2.99.98-1.1 amd64 GNU mailutils utilities for handling mail ||/ Name Version Architecture Description |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend In case you dont have mailutils installed, install it using apt-get.ĭesired=Unknown/Install/Remove/Purge/Hold Here are some ways you can send mail using Linux mail utility (mailutils package) on Ubuntu Linux. As an example you can send daily php error logs (with some cap) to your email. Linux command line tools to send mails are very handy for sending mails from bash scripts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |