Open Laboratory for Technocrats

Grab the developer role, learn concepts & prepare with senior software engineers to get solutions for problems in a software job. Coding and Programming Solutions crafted for you.

Sending emails from CMD using MUTT on Unix

MUTT



WHAT

Command line based client for managing emails. It is a powerful tool to use for reading and sending emails from CMD in Unix based operating systems. It also supports POP and IMPA protocols for receiving emails.

WHY


  • Easy to install and configure
  • Emails with attachments from the command line
  • BCC (Blind carbon copy) and CC (Carbon copy) while sending emails
  • Message threading
  • Facility of mailing lists
  • Support for mailbox formats like Maildir, mbox, MH, and MMDF
  • 20+ Language support
  • DSN (Delivery Status Notification) Support


HOW

Installation is simple as:
For Debian / Ubuntu based system
apt-get install mutt
or

For RHEL / CentOS / Fedora based system
yum install mutt

Configuration

Now we need to take care of config file which will handle the sender details and other information regarding email
Master configuration file “/etc/Muttrc“
User Specific configuration file "~/.muttrc" or "~/.mutt/muttrc" files

Change/Add details to the config file:
set from = "user@domain.com"
set realname = "Realname of the user"

Basic Syntax- 

mutt options recipient

Example:
mutt -s "Test Email" openT@openTest.com

This will give you the basic access to the use it.
Reference for this article is https://www.tecmint.com/send-mail-from-command-line-using-mutt-command/ you can learn a lot more.

Keep Learning 

Top #3 Articles

Most Read