|
Tenta assim::
public
void
sendMailSMTP(String from, String to, String subject, String text, Properties
prop){
Properties configuracao = prop == null ? System.getProperties() : prop;;Session mailSession = Session.getInstance(configuracao); Message msg = new MimeMessage(mailSession); try { ArrayList enderecos = filtraEmail(to); Iterator itera = enderecos.iterator(); while(itera.hasNext()){ String newTo = itera.next().toString().trim(); msg.setFrom(new InternetAddress(from)); msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(newTo)); msg.setSentDate(DataTools.getData()); msg.setSubject(subject); msg.setText(text); Transport.send(msg); } } catch (Exception e) { throw new ExceptionHandler(e).createTechnicalException(); } } Se isso n�o der certo tenta
construir o properties configuracao na m�o.
----- Original Message -----
|
- [JUG-Petro] E-MAIL com problemas Gustavo Barroso
- Re: [JUG-Petro] E-MAIL com problemas Gustavo Barroso
- Re: [JUG-Petro] E-MAIL com problemas Conrad Peres
- Re: [JUG-Petro] E-MAIL com problema... Gustavo Barroso
- Re: [JUG-Petro] E-MAIL com problema... Aldenir de Farias Barboza
- Nilton
