Step One.

vim /etc/mail.rc
#Appending two lines blow at the buttom of you just opened file /etc/mail.rc
#Line one
set from=simon.xie@codewalker.me smtp=smtp.qq.com
#Line two
set smtp-auth-user=simon.xie@codewalker.me smtp-auth-password=thisIsPassWordOfYourEmail smtp-auth=login

Step Two.

echo “this is content of EMail” |mail -s “this is title” someone@email.address