Wednesday, June 16, 2021

Sending mail using Unix commands

 

1) uuencode filename.txt | mailx -s "filename details"  -c abc@test.com -r noreply@test.com sender@test.com


2) mail -s "Test mail" abc@test.com < TestFile.txt


3)  (echo "Hi All, \n Please find the attached details in the email \n Thanks \n Application Team"; uuencode File.txt attahedFile.txt) | mailx -s "File details" -c abc@test.com -r noreply@test.com sender@test.com

No comments: