Added initial sendemail code