root@kali:~# apt-get install bsd-mailx
root@kali:~# apt install ssmtp
root@kali:~# leafpad /etc/ssmtp/ssmtp.conf
PASTE BELOW TEXT AT /etc/ssmtp/ssmtp.conf
root@kali:~# mail -s "asssssssss" adityashrest.shrest34@gmail.com < asd
root@kali:~# apt install ssmtp
root@kali:~# leafpad /etc/ssmtp/ssmtp.conf
PASTE BELOW TEXT AT /etc/ssmtp/ssmtp.conf
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=YOUR EMAIL ID
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com:587
AuthUser=YOUR EMAIL ID
AuthPass=password
UseTLS=YES
UseSTARTTLS=YES
# Where will the mail seem to come from?
#rewriteDomain=gmail.com
# The full hostname
hostname=kali
# Are users allowed to set their own From: address?
#YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=NO
Debug=YES
root@kali:~# mail -s "asssssssss" adityashrest.shrest34@gmail.com < asd