Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

Linux Tutorials: Commands to send an email in Linux

rajeshkumar created the topic: Various Commands to send an email in Linux
Sending mail
To send a message to one or more people, mailx can be invoked with arguments which are the names of people to whom the mail will be sent. The user is then expected to type in his message, followed by an ‘control-D’ at the beginning of a line.

mails -s "this is test" -a SG_COMM.sql.gz rajeshk@adobe.com < raj.txt

mailx rajesh@xyz.com < /tmp/db_reorg.log
echo "This is test Subject" | mailx rajesh@xyz.com
mailx -s "This is test Subject" rajesh@xyz.com < test.txt
echo "This is test Subject" | mailx -c love@xyz.com -s "Join us watching Star Wars" rajesh@xyz.com

Send an email in Linux with attachment
Attach /tmp/list.tar.gz and and send it

uuencode /tmp/list.tar.gz /tmp/list.tar.gz | mailx -s "Subject" rajesh@xyz.com

Email photo.png along with a text message read from body.txt
cat body.txt; uuencode photo.png photo.png) | mail -s "Subject" rajesh@xyz.com

Attach /tmp/filelist.tar.gz and read the content of a text using /tmp/body.txt
mutt -s “Backup status” -a /tmp/filelist.tar.gz rajesh@xyz.com < /tmp/body.txt

Unix command to send an email attachment
or
mailx command to send an email with attachment

Code:
uuencode file1 file2 | mail user@companyname.co.in -s "subject"

uuencode is a utility which is to be found with sharutils. make sure its installed. To check wheterh its installed or not.

which uuencode or
locate uuencode or
rpm -qa | grep sharutils

If you do not found, then you might have to install it. You need to install sharutils by folliwing commands….

Install uuencode
======================================
yum install shareutils
or
wget ftp.scientificlinux.org/linux/scientific/6.2/x86_64/os/Packages/sharutils-4.7-6.1.el6.x86_64.rpm
rpm -ivh sharutils-4.7-6.1.el6.x86_64.rpm
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

Chmod: Change File Permissions Recursively

Rajesh KumarI’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus. I share tech blog at DevOps School, travel stories at Holiday…

Read More

Shell Bash Scripting: Assignment & Excercise – 14

Write a Shell Bash Script for convert Decimal Number to Binary Rajesh KumarI’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus….

Read More

Shell Bash Scripting: Assignment & Excercise – 13

Write a Shell Bash Script for test if a number being entered is a Fibonacci or not Rajesh KumarI’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and…

Read More

Shell Bash Scripting: Assignment & Excercise – 12

Write a Shell Bash Script for check if a number is prime or not Rajesh KumarI’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have…

Read More

Shell Bash Scripting: Assignment & Excercise – 11

Write a Shell Bash Script for check if a provided number is Armstrong or not Rajesh KumarI’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I…

Read More

Shell Bash Scripting: Assignment & Excercise – 10

Write a Shell Bash Script for check if a number input from standard input is odd or even Rajesh KumarI’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x