Fixed error in mailer alert function