I have a job that uses sendmail to mail a file into LOTUS NOTES and along with the mail is a UNIX TEXT FILE as an attachment. When I use WordPad to view the attachment, I get some garbage characters in the file. however, when I ftp the file over the file is just fine. Do I need to use some sore of decoding or is there anythin else I should do to the file prior to sending it as an attachment?
This conversation is currently closed to new comments.
If I understand the problem correctly, there are a couple of possibilities. One is that sendmail is using either a non-standard default character set or not using pure text MIME encoding. That would, of course, be fixed on the sendmail end in theconfiguration file.
I'd also look at the Notes end and make sure it is set to handle pure text. I'm pretty ignorant of Notes, but I know Exchange has a couple of options for how MIME attachments are handled.
Thanks very much Paul. I will take a look at the snedmail configuration file and if I run into more issues, then will let you know. Thanks again. -Reza.
The main difference between UNIX and DOS(Windows) text files is string termination. In "UNIX-World" each string terminates by LF-character (ASCII code 10), and DOS-way is terminating strings bye CR-LF pair (ASCII 13 and 10). When you get text file using ftp (as ASCII, not binary) it make this convertion. When you receive "pure" file by e-mail and open it "as is", WordPad can`t recognize strings terminations. Try adjust your mail client to LF to CR-LF convertion.
As the previous answer mentioned, Win/DOS expects the lines to end with LF-CR, while Unix just uses LF. If you can't get your app to view the lines correctly from the Windows side, you can try fixing them while still in Unix, using vim, a standard text editor available in many Unix installations. Open the file by issuing the command "vim <filename>". Then, change the format vim saves in by typing ":set ff=dos" in the vim window (the colon is important). Then resave the file and exit vim by typing ":wq" in the vim window. Vim can also be used to get rid of the annoying ^M's that show up when you send Win/DOS files to Unix, by using ":set ff=unix" instead.
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
A UNIX TEXT FILE IN WINDOS HAS SOME GARB
When I use WordPad to view the attachment, I get some garbage characters in the file.
however, when I ftp the file over the file is just fine.
Do I need to use some sore of decoding or is there anythin else I should do to the file prior to sending it as an attachment?