Fixed rake task sendmail. Added logs