Updated the mailer and core for mail with attachment