Send Textbody with Multiple Lines with JavaMail
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, May 29, 2001 04:59 AM

Hi, Where can I find an example to send JavaMails with serveral lines in the Textbody ??

Thanks for answers !!

Re: Send Textbody with Multiple Lines with JavaMail

Posted By:   Ivo_Limmen  
Posted On:   Tuesday, May 29, 2001 06:45 AM

Try this:

...
StringBuffer sb = new StringBuffer();

sb.append("This is line 1
");
sb.append("This is the second line
");
sb.append("...");

msg.setText(sb.toString());
...

You must use one bodypart with text but the text can contain multiple lines. So you need to use the
.

Re: Send Textbody with Multiple Lines with JavaMail

Posted By:   Anonymous  
Posted On:   Tuesday, May 29, 2001 06:29 AM

if you generating a new MimeMessage linke in the demos

you can set the Text with:

setText(java.lang.String text, java.lang.String charset)

so it is a String an all linefeeds ans returns
will be set also.

Or is there another problem?

alex
About | Sitemap | Contact