Good Day,
Try the following code.
| InitialContext ctx = new InitialContext() ;
| Session mailSession = (Session) ctx.lookup("java:Mail") ;
| Message msg = new MimeMessage(mailSession);
| InternetAddress toAddrs[] = new InternetAddress[1];
| toAddrs[0] = new InternetAddress("[EMAIL PROTECTED]");
| msg.setRecipients(Message.RecipientType.TO, toAddr);
| msg.setFrom();
| msg.setSubject("Takeoff time.");
| msg.setSentDate(new Date());
| String content = new String("Test");
| msg.setText(content);
| Transport.send(msg);
|
http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail.html
Regards,
Mark P Ashworth
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968033#3968033
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968033
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user