why get content to html and get parameter for send message but it can't sent?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   anusorn_kongpholpaiboon
Posted On:   Monday, February 4, 2002 02:28 AM

Urgent please answer to me immediately thank you so much. what's wrong with my code ? when i sent it already i check it at my email but it in part of content it become ----- =part 5 14565456.2548888 -- what'wrong? private void forward(MailUserData mud, HttpServletResponse res, ServletOutputStream out,int msgNum1,int noNum) throws IOException { try{ String content=""; MimeMultipart mmp ; Message msg = mud.getFolder().getMessage(msgNum1); MimeMessage orig = (MimeMessage)msg; //StringBuffer buffer = new StringBuffer("Thanks "); if (orig.isMimeType("text/plain")) { orig.reply(false);    More>>

Urgent please answer to me immediately thank you so much.

what's wrong with my code ?

when i sent it already i check it at my email but it in part of content it become
----- =part 5 14565456.2548888 --
what'wrong?

private void forward(MailUserData mud, HttpServletResponse res,
ServletOutputStream out,int msgNum1,int noNum)
throws IOException {
try{
String content="";
MimeMultipart mmp ;
Message msg = mud.getFolder().getMessage(msgNum1);
MimeMessage orig = (MimeMessage)msg;
//StringBuffer buffer = new StringBuffer("Thanks

");
if (orig.isMimeType("text/plain")) {
orig.reply(false);
msg.setText((String)msg.getContent());
content = (String)msg.getContent();
System.out.println(content);
System.out.println("in text/plain");

}else if(orig.isMimeType("multipart/*")){
mmp=(MimeMultipart)orig.getContent();
for(int i=0;i < mmp.getCount();i++){
mmp.removeBodyPart(i);
}
orig.setContent(mmp);
content = (String)orig.getContent();
System.out.println(content);
System.out.println("in multipart");
}

res.setContentType("text/html");
out.println(" ");
out.println("
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println("

");
out.println("

C ompose ");
out.println(" F orm
");
out.println("

 ");
out.println("

");
out.println(" ");
out.println(" ");
out.println(" ");
out.println("
");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println("
");
out.println("

To: ");
out.println("

");
out.println(" ");
out.println(" ");
out.println(" (separate addresses with commas)
");
out.println("

CC: ");
out.println("

");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" (separate addresses with commas)
");
out.println("

BCC: ");
out.println("

");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" (separate addresses with commas)
");
out.println("

Subject: ");
out.println("

");
out.println(" ");
out.println("
");
out.println("

Attachment:

");
out.println("
");
out.println(" ");
out.println(" ");
out.println(" ");
out.println("
  ");
out.println(" ");
out.println(" ");
out.println("
  ");
out.println(" ");
out.println("
  ");
out.println(" ");
out.println("
  ");
out.println(" ");
out.println(" ");
out.println("
");
out.println("
");
out.println("

  ");
out.println("

");
out.println("

");
out.println(" ");
out.println(" ");
System.out.println("pass print test file");
} catch (MessagingException mex) {
out.println(mex.toString());
System.out.println(mex.getMessage());
}

System.out.println("at close");
out.close();
System.out.println("end close");
}    <<Less
About | Sitemap | Contact