Can use gen_smtp to send mail ,
git clone https://github.com/Vagabond/gen_smtp.git
make
erl -pa bin/
gen_smtp_client:send({"hahaliu005@163.com", ["liugang@nibirutech.com"], "Subject: testing\r\nFrom: Andrew Thompson \r\nTo: Some Dude \r\n\r\nThis is the email body11111111"}, [{relay, "smtp.163.com"}, {username, "username"}, {password, "password"},{auth,always},{tls,never}]).