I'm trying to create a send email function in netbeans and it says
"incompatible types: InternetAddress cannot be converted to InternetAddress[]".
When I write InternetAddress[] address = new InternetAddress[10]();
it complains about a ; missing.
mailSession.setDebug(sessionDebug);
Message msg = new MimeMessage(mailSession);
msg.setFrom(new InternetAddress(from));
InternetAddress[] address = (new InternetAddress(to));
msg.setRecipients(Message.RecipientType.TO, address);
msg.setSubject(subject);
msg.setSentDate(new Date());
msg.setText(messageText);