fixed mailer core bug