E
Edward A Thompson
I have a small app that builds an ArrayList of Strings (lines of a
report terminated with "\n").
The toString function turns the ArrayList into a single String, with
each 'line' terminated with a "\n".
If I print the resulting String, all is well:
3M DRG Assurance
Validity and Status Report
But when I try to email that String, I get:
[
, 3M DRG Assurance
, Validity and Status Report]
note the brackets and commas. Here is the relevant code:
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
message.setRecipients(
Message.RecipientType.TO,
InternetAddress.parse(to)
);
message.setSubject(subject);
...
message.setText(text.toString);
Can anyone shed some light on this?
report terminated with "\n").
The toString function turns the ArrayList into a single String, with
each 'line' terminated with a "\n".
If I print the resulting String, all is well:
3M DRG Assurance
Validity and Status Report
But when I try to email that String, I get:
[
, 3M DRG Assurance
, Validity and Status Report]
note the brackets and commas. Here is the relevant code:
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
message.setRecipients(
Message.RecipientType.TO,
InternetAddress.parse(to)
);
message.setSubject(subject);
...
message.setText(text.toString);
Can anyone shed some light on this?