When I put the below command
echo "Subject: hello" | sendmail -v test@example.com < mail.txt
I get the email but with no subject.
Can someone let me know what must be done to get the subject as hello
When I put the below command
echo "Subject: hello" | sendmail -v test@example.com < mail.txt
I get the email but with no subject.
Can someone let me know what must be done to get the subject as hello
Seems like your ssmtp is not properly setup. I reproduced the error at my end and resolved the error as follows: Assuming that you already have mailutils installed. If not just enter the command
sudo apt-get install mailutils
sudo apt-get install ssmpt
gedit admin:///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=postmaster
# 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=mail
mailhub=smtp.gmail.com:587
AuthUser=xxxxx@gmail.com
AuthPass=yyyyyy
UseTLS=YES
UseSTARTTLS=Yes
# Where will the mail seem to come from?
#rewriteDomain=xxxxxx@gmail.com
# The full hostname
hostname=zzzzz
# 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=YES
Make sure to save your config file. Then run the sendmail command. You should be able to get a output sowing a lot more details on the command line rather than just a single line you are getting now.