Results 1 to 14 of 14
Thread: Formatting String
- 10-20-2009, 06:08 PM #1
Member
- Join Date
- Aug 2009
- Posts
- 51
- Rep Power
- 0
-
HTML code? But I didn't think all email readers read (or are set to read) html.
- 10-20-2009, 06:17 PM #3
Member
- Join Date
- Aug 2009
- Posts
- 51
- Rep Power
- 0
Hi Fubarable
Thanks for replying. The code is written in java and with a specific event an email has to be sent but certain part of the email text has to be bold.
-
I think that I understood what you are saying, but I'm not sure you are understanding me. email is text, pure and simple. You can't "bold" text unless the receiving program has a way of reading whatever you are using to format the text with.
- 10-20-2009, 06:27 PM #5
Member
- Join Date
- Aug 2009
- Posts
- 51
- Rep Power
- 0
You see when the email is sent with text in bold letters then when the email is recieved it will be in bold letters rite. So now the thing is that i have to make my text bold then automatically the email be recived in bold letters
-
You understand that email consists of nothing but text, right? If you wish to "bold" text, you can do this if you use HTML mark-up and if the reading program is set to read and allow HTML formatting. I feel that I'm right here (but am not an "email" pro -- so any corrections are welcome). If I am right, I don't know how to explain this to you in any other way that is understandable.
Please let me know if this is misleading in any way or if you (or anyone else) feels I am mistaken in my assumptions and how. I'm willing to learn.Last edited by Fubarable; 10-20-2009 at 06:37 PM.
- 10-20-2009, 06:37 PM #7
Member
- Join Date
- Aug 2009
- Posts
- 51
- Rep Power
- 0
Yes I know so that is what I want to do with a program. I am sure there must be a way of doing this. I mean if I have to send an email through java program and make the text of email bold then Java should have an answer for this??????
-
perhaps you wish to Google how to add HTML markup to strings using Java. I don't do this myself, but I'm sure that it is eminently possible.
- 10-21-2009, 01:52 AM #9
Member
- Join Date
- Oct 2009
- Posts
- 25
- Rep Power
- 0
ersachinjain,
Here is an example of what Fubarable is talking about:
String message = "This is my email message. I am feeling <b>bold</b>today!";
Do you see how the word "bold" is marked up with HTML? By doing this, email clients will notice the markup and display any text between <b> and </b> in bold.
- 10-21-2009, 03:57 PM #10
Member
- Join Date
- Aug 2009
- Posts
- 51
- Rep Power
- 0
Hi literallyjer
Thanks for the example. I have tried this also. For eg. my text is stored in the string strtemp. So I am doing like this strtemp = "<b>" + strtemp + "</b>". even then it is nt working. Infact it is concatanating those tags to the email message:(
Sachin
- 10-21-2009, 04:58 PM #11
Member
- Join Date
- Oct 2009
- Posts
- 25
- Rep Power
- 0
- 10-21-2009, 05:20 PM #12
Member
- Join Date
- Aug 2009
- Posts
- 51
- Rep Power
- 0
No no I am not printing them on console i am sending them as a text of an email. When you say that it is upto the email client to parse those tags do you mean that the email server that is recieving my emails will have to parse so for eg if i am sending the email to say gmail the email server of gmail has to parse those tags.
Thanks
- 10-21-2009, 05:41 PM #13
Member
- Join Date
- Oct 2009
- Posts
- 25
- Rep Power
- 0
- 10-21-2009, 09:26 PM #14
Member
- Join Date
- Aug 2009
- Posts
- 51
- Rep Power
- 0
Similar Threads
-
formatting..
By sireesha in forum New To JavaReplies: 16Last Post: 06-26-2009, 07:11 PM -
Formatting a toString
By MooNinja in forum New To JavaReplies: 8Last Post: 03-31-2009, 07:32 PM -
Formatting time and date
By Java Tip in forum java.langReplies: 0Last Post: 04-17-2008, 07:35 PM -
formatting String
By bugger in forum New To JavaReplies: 1Last Post: 11-16-2007, 07:27 PM -
Formatting the date
By yuchuang in forum New To JavaReplies: 5Last Post: 05-07-2007, 06:08 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks