Since I run the service simplemail.co.in, I can use it to send a simple mail via command line.
Before doing that, I have to install two libraries in my debian/ubuntu system.
$ sudo apt install libnet-ssleay-perl libio-socket-ssl-perl
Then install the module Net::SimpleMail from cpan. Yes this module is written by me as well.
$ sudo cpanm Net::SimpleMail
To make the program work, I have to set up two environment variables.
$ export SM_USER="..."
$ export SM_PASS="..."
They are username/password of SimpleMail. Certainly you can put them in .bash_profile for convenience.
Run the following command to send a simple mail.
$ perl -MNet::SimpleMail -Mutf8 -e 'simplemail("walt\@ik.me","你好","这是一封中文邮件")'
As you see it can be a Chinese message.
OK that's all. Sending mail via Simple Mail is just simple.