Added db support to SendMail