Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need " > " to show on reply emails

Status
Not open for further replies.

Ngai88

Programmer
Sep 8, 2004
56
US
hello,

In my reply email, I want ">" to show up at the beginning of every line so that it separates the previous messages from the new one to be.

How do I make the ">" to show up?

Example:
>To :public Information; Agriculture; Recovery
>Subject:[RE]: testing0944
>Date:2004-11-03 09:49:28.0


>Hello,
> I am doing a test to see if the body message shows up >properly.

>later,
>NoBody

Thanks,
Ngai

===========================================================
this is the code I have to create the above
===========================================================
if(msg != null) {

outSubject.setContent(msg.getSubject());

outBody.setContent("From :" + msg.getSenderId()+ "\n" + "To :" + msg.getRecipient().replaceAll("<br>", "; " ) + "\n" + "Subject:" + msg.getSubject()+ "\n" +"Date:" + msg.getTimeSent()+ "\n" + "\n" + "\n" + msg.getMsgBody());

}


 
Hi again,

I got the reply mail content to look like this ...

Example:

>From :Volunteer Organizations
>To :public Information; Agriculture; Recovery
>Subject:[RE]: testing0944
>Date:2004-11-03 09:49:28.0


> Hello,
I am doing a test to see if the body message shows up properly.

later,
NoBody

++++++++++++++++++++++++++++++++++++++++++++++++++++++

How do you get the following lines of the rest of the message body to also have '>' to show up?

thanks,
Ngai
 
It looks as if you need to parse what you're getting from msg.getMsgBody(). You could probably do something like msg.getMsgBody().replaceAll("\n", "\n>"), if I understand you correctly... <p>Liam Morley<br><A HREF="mailto:"></A><br>&quot;light the deep, and bring silence to the world.<br>light the world, and bring depth to the silence.&quot;
 
Hi Liam,
Thank you for replying. I thought about it and I decided to set up a loop to let it does it's job for me. This seems to work.

something like this.....

for (int i = 0; i < length; i++)
{
char c = strBody.charAt(i);
if ('\n' == c) {

prefix.append(c).append('>');
} else {
prefix.append(c);

}
}
outBody.setContent(prefix.toString());


thanks anyway.

Ngai
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top