• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Mail Prob.. Help pls Urgent  RSS feed

 
Anusha Jv
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have to send mail from java.I have a button which when clicked calls the method given below for sending
the mail.
The mail panel is over an Applet.
When i minimise the appletviewer or move to another window in the case of browser,I just see a blank
panel(
everything whitein color) until the mail has been sent successfully.
What might be the problem.I first tried without runnable
Still same problem.
What must be done.......
Expecting the reply very urgent

private void sendEmail()
{
email.jButEmail[0].setCursor(
Cursor.getPredefinedCursor(
Cursor.WAIT_CURSOR));
final StartApplet ap=new StartApplet();
ap.repaint();
SwingUtilities.invokeLater(
new Runnable()
{
public void run()
{
String strFrom=ap.getUserEmail();
String strTo=ap.getEmailAdresses(jRadioButEmail[intSelectedRB].getText());
sm.debug=true;
sm.setHost(DataProvider.getHost());
sm.setFROM(strFrom);
sm.setTO(strTo);
sm.setSubject(jTFSubject.getText());
sm.setMessage(jEPContent.getText());
sm.setAttachment(strFile);
ap.repaint();
sm.send();
ap.repaint();
strTo=null;
strFrom=null;
jTFSubject.setText("");
jEPContent.setText("");
JOptionPane.showMessageDialog(jFramefrm,
"Mail has been sent successfully.");
}
});
ap.repaint();
email.jButEmail[0].setCursor(
Cursor.getPredefinedCursor(
Cursor.DEFAULT_CURSOR));
}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!