[jboss-user] [Beginners Corner] - Re: JavaMail problem
info@connext.co.za
do-not-reply at jboss.com
Tue Aug 29 06:15:38 EDT 2006
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("damijan at hit.si");
| 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
More information about the jboss-user
mailing list