mail sent fucntionality