• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get Formatted Mail Content through Java Application  RSS feed

 
prem kanna
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a mail sending function in my applet code which is listed below:
Main content is fetched from a format tool bar in JSP Page and it is passed as parameter to applet and it is used inside the mail content.
Same content when passed and executed in a JSP page, the formatted content is not lost and it is included in mail content as what it is fetched from Format Tool Bar.
Format is lost when it is used inside the Java Application mail sending function.
The below code I have used to send mail:



Content placed in format tool bar is as follows:

Index
I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:
• Engage
• Chapters 1–6
ftp:///Index
XML Coding - Files with errors
• Engage
• Chapters 1–6
ftp:///XML_Coding_Need%20Fixing


Content fetched from format tool bar inside JSP page is as follows:

<strong>Index</strong>
I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:
• Engage
• Chapters 1–6
ftp:///Index<strong>
XML Coding - Files with errors</strong>
• Engage
• Chapters 1–6
ftp:///XML_Coding_Need%20Fixing



Fetched Content inside Java Application through parameter and it will use as input for mail content is as follows:


<strong>Index</strong>
I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:
• Engage
• Chapters 1–6
ftp:///Index<strong>
XML Coding - Files with errors</strong>
• Engage
• Chapters 1–6
ftp:///XML_Coding_Need%20Fixing



Actual mail received after Java Application execution is as follows:
Index
I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:
? Engage
? Chapters 1?6
ftp:///Index
XML Coding - Files with errors
? Engage
? Chapters 1?6
ftp:///XML_Coding_Need%20Fixing
Unicode characters in the mail content are replaced by “?”.



In the function listed above I have used the MIME Setting as

Multipart multipart = new MimeMultipart("alternative");

I have tried by using “relative” MIME format also as

Multipart multipart = new MimeMultipart("relative");

But I am not getting the actual format passed as input to the Java Application in the mail content.
Can anybody let us know how to overcome this problem?
Thanks in advance.


 
prem kanna
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

can any one please give some Suggestion.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PatienceIsAVirtue

What do you mean by "Format is lost when it is used inside the Java Application mail sending function."? How are you checking that the outgoing mail doesn't include those tags? If you're merely talking about how it looks in the client, then be aware that that's not well-formed HTML. Try sending properly formatted HTML markup.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!