I executed your code but sendMail function always return None value. I have to do some additional configuration for this?