on 09-04-2010 12:46 PM
Hi experts,
in my scenario I'm sending mail from ECC to several address using a receiver mail adapter with mail package.
I'm using mail package cos I need to dynamically set field To, From and the Name of the file attached.
The file attached is and must be a txt file.
I'm using UDF to populate content field of mail package.
I need that in the attachment file every record is in a new line, for example 15 record -->> 15 lines, like this:
record 1
record 2
record 3
.....
The problem is:
If I open the file with word pad, ultraedit, word, or another similar editor is ok, but if I open with notepad (standard editor when double click) all the record are in one line, separated by a little square box, like this:
record1 <square box> record2 <square box> record3 <square box>.....
Why with notepad I don't see 1 record per line? how to solve this problem?
below the UDF that I'm using to populate content field of mail package:
public void CreateContent(String[] a,ResultList result,Container container){
AbstractTrace trace = container.getTrace();
String str = "";
for(int i=0;i<a.length;i++)
{
if(i == (a.length-1))
str = str + a{i};
else
str = str + a + "\n" ;
}
result.addValue(str);
}
////Please consider that curly bracket square bracket as for standard Java array elements,the problem is when I post it on SDN,index element goes off.
I also tried to use "\r\n" or "\r" or "\n\r" (every possible combinations...) instead of "\n" but problem still remains.
Thanks
Fabio Boni
Edited by: Fabio Boni on Sep 4, 2010 1:54 PM
Hi,
I think this is common problem (not problem ) with notepad. Most of the time we can select Wordpad as default editor to prevent ths problem. I think we don't have alternative solution for this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> Why with notepad I don't see 1 record per line?
Notepad shows newline correcly only for files created on Windows. I suppose your PI is running on Unix or other OS.
> how to solve this problem?
Make Wordpad your standard editor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
Why with notepad I don't see 1 record per line? how to solve this problem?
Hi,
this is the problem, seems so clear.
To use wordpad as standard editor is not an answer, neither for me, nor for other people who receives mail.
No solution is a better answer.
Best Regards
Fabio Boni
Edited by: Fabio Boni on Sep 6, 2010 10:46 AM
Edited by: Fabio Boni on Sep 6, 2010 10:47 AM
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.