Score:0

Sending Email from Comand Line in Ubuntu and specify Sender

no flag

Installed mailutils on my Ubuntu 20.x Server via sudo apt-get install mailutils. And did basic setup and can send mail from the comand line but run into a few issues. a) One i need to be able to set the from Email as it currently uses the hostname as the domain name like couch@couch-cluster-a. Where can i change that ? I tried -r 'Couch Base couchbackup@domain.net' but that did not work. b) when i attach a file (in my case a report the body is also an attachment and not plain text as specified. Is there a setting that allows me to send a plain text as body and still attach a txt file as an attachment ? Here is what i used with no luck

echo "Message Body Here" | mail -s "Couchbase Backup" -r 'Couch Base <couchbackup@domain.net>' user@demo.net -A /home/log/backupcron-2021-06-10_00:00:01.log

I know thses are not valid domains i just provided them as sample

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.