• Post Reply Bookmark Topic Watch Topic
  • New Topic

Any Sample for Email Editor ?

 
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is common now to have email editors that quote a previous email for reply. This is not unlike this forum where one can quote a post in his reply.

Where can I find sample source codes of such email editor which I'd like to implement on J2EE platform ?
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ken,

Are you familiar with the JavaMail API? If you haven't use it before, perhaps you could follow a simple tutorial from jGuru to get you up to speed with it.

Once you're familiar with the API, perhaps you won't be needing that sample code anymore. In order to be able to quote the received email in a reply, you'd need to have the message contents of that received email. You'll be able to do it after you follow the tutorial. Once you have the message contents, you could either store it in a StringBuffer & the format it in any manner you like in the reply message.

Of course if you're hoping to see codes that can show you how to do the GUI of the email client as well as the necessary formatting, that would be an entire story. That would require you to be proficient in Swing as well.

HTH.
 
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chengwei,

Thanks for the info. I didn't know that JavaMail has the "quote" feature. The last time I used JavaMail was at least 5 years ago. Thanks for having me updated.

Ken

Originally posted by Chengwei Lee:
Hi Ken,

Are you familiar with the JavaMail API? If you haven't use it before, perhaps you could follow a simple tutorial from jGuru to get you up to speed with it.

Once you're familiar with the API, perhaps you won't be needing that sample code anymore. In order to be able to quote the received email in a reply, you'd need to have the message contents of that received email. You'll be able to do it after you follow the tutorial. Once you have the message contents, you could either store it in a StringBuffer & the format it in any manner you like in the reply message.

Of course if you're hoping to see codes that can show you how to do the GUI of the email client as well as the necessary formatting, that would be an entire story. That would require you to be proficient in Swing as well.

HTH.
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ken,


Thanks for the info. I didn't know that JavaMail has the "quote" feature. The last time I used JavaMail was at least 5 years ago. Thanks for having me updated.


JavaMail doesn't have any "quote" feature. What I was trying to say was that you have access to all the contents of incoming emails by using JavaMail. Hence, you could use these contents and quote them inside your replies.

Hope I'm being clearer this time round.

 
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh dear, I think I've not been too concise myself. That also means that I haven't found the solution that I've been looking for, which is to "quote" a past posting in an email editor.

Any info would be very much appreciated. Thanks Chengwei for trying to help.

Originally posted by Chengwei Lee:
Hi Ken,



JavaMail doesn't have any "quote" feature. What I was trying to say was that you have access to all the contents of incoming emails by using JavaMail. Hence, you could use these contents and quote them inside your replies.

Hope I'm being clearer this time round.


[ April 16, 2005: Message edited by: Ken Loh ]
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But Ken, you could implement that feature yourself using JavaMail isn't it?
 
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, please carry on. I'm all ears...

Just like to add to check if we're at the same bandwidth... I'm looking for a way to "quote" a previous mail's content on a web editor just like the editor that you and I use to post messages in Javaranch. Javaranch uses the UBB code of the square-bracketed "QUOTE" to quote to indicate previous mail.

I'm interested not in the setting or getting the previous mail as JavaMail is known to have the methods. I'm interested in how to display them when viewing and editing.

As email feature is very popular, I would think simple codes to do that should already exist. However, I'm guilty of being too busy to exhaustively google for the codes. My previous lame attempt yielded nothing.

Also, are there any design patterns for editing and viewing email ? I think sending should be quite direct with JavaMail, but I certainly wouldn't mind if someone could correct this perception of mine if it is wrong.

I don't know if I'm guilty of asking uninformed questions... but until two weeks' time before I could finish my current tasks, I could not dig further down on this subject. However, if you could give me a headstart, that'll be realy great.

Originally posted by Chengwei Lee:
But Ken, you could implement that feature yourself using JavaMail isn't it?
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have anything existing now? Or you totally unstarted? Are you trying to write a web-based or a desktop based email application?

You're attempting to have an email application that automatically quote previous replies whenever you click on reply. Am I right?
 
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, web-based, not unlike the email text editor that you could find in Yahoo! Mail or Hotmail. I've not started yet as I'm rushing to complete the current iteration phase.

You're right again on the point about automatically quote previous replies whenever I click on reply.

Any info to point me to the right direction (although I wouldn't complain if you point me to the source codes ) would be very much appreciated.

Originally posted by Chengwei Lee:
Do you have anything existing now? Or you totally unstarted? Are you trying to write a web-based or a desktop based email application?

You're attempting to have an email application that automatically quote previous replies whenever you click on reply. Am I right?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!