Pessoal, estou tentando enviar enviar email com servlets mas aparece alguns erros que qdo eu fazio direto no jsp não tinha, alguém sabe o pq desses erros?
-
The method put(String, String) is undefined for the type Properties
-
The method getInstance(Properties, Authenticator) in the type Session is not applicable for the arguments (Properties, null)
-
Line breakpoint:CqaAprova [line: 83] - processRequest(HttpServletRequest, HttpServletResponse)
Properties props = new Properties();
props.put("mail.smtp.host", "mailhost.sjtc.xxx.com");
Session s = Session.getInstance(props,null);
MimeMessage message = new MimeMessage(s);
InternetAddress from = new InternetAddress("Cqa@xx.com");
message.setFrom(from);
InternetAddress to = new InternetAddress(rs_emailC.getString("email"));
InternetAddress Bcc = new InternetAddress("xxx@xxx.com");
message.addRecipient(Message.RecipientType.TO, to);
message.addRecipient(Message.RecipientType.BCC, Bcc);
Desde já agradeço a ajuda!
Marcos