[jboss-user] [jBPM] - Error sending email in jbpm-4.2
carlos mauricio jaramillo henao
do-not-reply at jboss.com
Thu May 27 11:11:21 EDT 2010
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 at audifarma.com.co carlosj at audifarma.com.co"));
msg.setRecipients(Message.RecipientType.TO, " mailto:cmjhingeniero at yahoo.es cmjhingeniero at 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&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100527/6de8a560/attachment.html
More information about the jboss-user
mailing list