private void sendMail(Message msg, boolean urgent) {
        try {
            SimpleEmail mail = new SimpleEmail();
            mail.setHostName(smtpServer);
            mail.setSmtpPort(port);
            mail.setFrom(sender);
            mail.addTo(receiver);
            mail.setAuthentication(uname, pwd);
            mail.setSubject(subjPrefixes.get(urgent) + msg.getSubject());
            mail.setMsg(msg.getBody());
            mail.send();
        }
        catch (Exception e) {
            Logger.getLogger(getClass()).error("Cannot send e-mail", e);
        }

    }