Add send mail functions, lib, config and test codes etc.