to install the package on fedora:
sudo dnf install mutt
configure mutt :
you have to create a few directories where the system will store mails, headers, and certificates post-installation.
mkdir -p ~/.mutt/cache/headers
mkdir ~/.mutt/cache/bodies
touch ~/.mutt/certificates
create the mutt configuration file using the touch command and edit it:
touch ~/.mutt/muttrc
sudo nano ~/.mutt/muttrc
start filling in your mailbox's IMAP and SMTP details to populate the mailbox's settings for incoming and outgoing mails.
here are the settings:
set from = "username@gmail.com"
set realname = "First Last"
# IMAP settings
set imap_user = "username@gmail.com"
set imap_pass = "<mailbox password>"
# SMTP settings
set smtp_url = "smtps://username@smtp.gmail.com"
set smtp_pass = "<mailbox password>"
# Remote Gmail folders
set folder = "imaps://imap.gmail.com/"
set spoolfile = "+INBOX"
set postponed = "+[Gmail]/Drafts"
set record = "+[Gmail]/Sent Mail"
set trash = "+[Gmail]/Trash"
start sending emails
echo "Body of the email" | mutt -s 'Subject' someone@somewhere.com, anotherone@somewhere.com
echo "Body Message" | mutt -s "subject" someone@somewhere.com -a /path/to/file/test.txt