props.put("mail.transport.protocol", this.protocol);
props.put("mail." + this.protocol + ".host", this.smtpHost);
props.put("mail." + this.protocol + ".port", String.valueOf(this.port));
Session session = Session.getDefaultInstance(props, null);
transport = session.getTransport(this.protocol);
transport.connect(this.smtpHost, this.userName, this.passWord);
for (int i = 0; i < mailMessage.length; ++i) {
mailMessage[i].setSession(session);
transport.sendMessage(mailMessage[i].getMessage(),mailMessage[i].getMessage().getAllRecipients());
}