• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to email the content of the jtextpane

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys,

I'm trying to send an email with a jpg (that comes first)
I have the jpg and the text in a jtexpane.

does anyone know how email the content of the jtextpane?

Session session = Session.getDefaultInstance(props, null);
// construct the message
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));

msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));

msg.setSubject(subject);
msg.setText(userMessage);


thanks
Ppr
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!