created a email sender function and a simple mail protocol lib function