mutt command line

So today I was working on a script and I needed to send an email via the command line using the mutt client. This how I use mutt through the command line, mutt is a Linux email client… To use mutt you will first have to make sure mutt is installed, depending on your Linux OS the following command will vary but this is how I verified if mutt was installed or not:

yum info mutt

OR

rpm -qa mutt

If you do not have mutt installed you will need to install it using one of the following commands: (you will need to login as root)

# to install mutt on centos or fedora run the following command
yum install mutt
# to install mutt on redhat run the following command
up2date -i mutt

Once mutt is installed you can try the following command, which will send an email using the mutt client:

echo "this is a test" | mutt -s "subject" [email protected]

If you don’t receive your email within a couple of minutesĀ  then you will need to trouble shoot your computers mail server (the workstation/server will be using sendmail). You may need to re-configure the sendmail configuration file.

[ad#google-468×60]

Leave a Reply

Your email address will not be published. Required fields are marked *

*