Fixed mail send bugs