added sendmail function to core library

Signed-off-by: naazgull <pedro.figueiredo@gmail.com>