18.04.1-Ubuntu: Mail command unable to set mail body with attachment
3
votes
1
answer
1074
views
I am trying to use
mail
command to send 2 attachments. The issue which i am facing is unable to send attachment and mail body content. tried following command
echo "Hello World" | mail -s 'Test Email' -A test.csv -aFrom:no-reply@test.com abcd@test.com
cat README.txt | mail -s 'Test Email' -A test.csv -aFrom:no-reply@test.com abcd@test.com
mail -s 'Test Email' -A test.csv -aFrom:no-reply@test.com abcd@test.com < README.txt
Whereas I send mail body alone then mail is received with body
mail -s 'Test Email' -aFrom:no-reply@test.com abcd@test.com < README.txt
How to send both attachment and mail body (README.txt
in mail body and test.csv
in attachment)?
Asked by Murugan M
(31 rep)
May 17, 2019, 04:20 AM
Last activity: Dec 7, 2022, 05:00 PM
Last activity: Dec 7, 2022, 05:00 PM