carlos mauricio jaramillo henao [
http://community.jboss.org/people/cmjhingeniero] replied
to the discussion
"Error sending email in jbpm-4.2"
To view the discussion, visit:
http://community.jboss.org/message/545145#545145
--------------------------------------------------------------
I could not solve the problem, so I consulted the web is in the configuration of tomcat.
If anyone can help me I appreciate it. I tried sending email from a normal java method
and I get the following error:
javax.mail.NoSuchProviderException: smtp
Source Code Java:
public void send(){
MimeMultipart multipart = new MimeMultipart();
Properties properties = new Properties();
properties.put("mail.smtp.host", "10.1.1.20");
Session session = Session.getDefaultInstance(properties, null);
session.setDebug(true);
try {
MimeMessage msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(" mailto:carlosj@audifarma.com.co
carlosj(a)audifarma.com.co"));
msg.setRecipients(Message.RecipientType.TO, "
mailto:cmjhingeniero@yahoo.es cmjhingeniero(a)yahoo.es");
msg.setSubject("PROBANDO");
msg.setSentDate(new Date());
MimeBodyPart mbp = new MimeBodyPart();
mbp.setText("PROBANDO");
multipart.addBodyPart(mbp);
msg.setContent(multipart);
Transport t = session.getTransport("smtp");
t.connect();
Transport.send(msg);
t.close();
System.out.println("===>Correo Enviado...");
}
catch (Exception mex){
System.out.println("===>Error MailSender.send() = "+mex);
}
}
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/545145#545145]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]