Function to send email from the server.