fixed eror when sending mail with delay job