Mail attachment dispaying in different format.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mail attachment dispaying in different format.
# 1  
Old 07-26-2012
Error Mail attachment dispaying in different format.

Hi friends,

I have file1.txt where i am sending this file as attatment in mail using below code

Code:
 
uuencode file1.txt file1.txt | mail -s  'TestFile' test@test.com

but the format of the file is changing when i open in attachement.

file1.txt in unix

HTML Code:
1|hyd|nag
2|jun|kin

file1.txt in notepad

HTML Code:
1|hyd|nag 2|jun|kin
Please help.
# 2  
Old 07-26-2012
I guess Notepad is on Windows? Then you need to add a <CR> (0x0D) char before the newline char at the end of the line. Don't know if uuencode can do this for you.
This User Gave Thanks to RudiC For This Post:
# 3  
Old 07-26-2012
@Rudic, Thanaks for the reply. Yes your correct, notepad in windows. We are Using AIX OS, Is there any posibility other than uuencode so that we can use <CR> . and could please explain the <CR> concept .
# 4  
Old 07-26-2012
Have you tried opening in WordPad?
Also, there are two routines that many use when moving files:
dos2unix and unix2dos
# 5  
Old 07-26-2012
Text is treated differently in UNIX and in Windows. UNIX only requires a newline char (hexadecimal 0x0A) while Windows needs two chars: carriage return (<CR>, 0x0D) plus newline to end a line. As joeyg points out, there might be other editors (e.g. EDITPAD) that can handle UNIX text. A powerful alternative to unix2dos is recode (e.g. recode lat1..ibmpc file1.txt)
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mail attachment

Hi, I want to send an attachment and content in a single mail using unix command can anyone pls help me? Thanks Naveen A (6 Replies)
Discussion started by: Pranaveen
6 Replies

2. Shell Programming and Scripting

Getting mail with no Attachment

Hi All, my requirement send a mail with attachment a abc.txt file. below is the shell script. #!/usr/bin/ksh set -x #DIR=/appldata/download/mail MAILTO="krupa.behera@kk.com" SUBJECT="Report" BODY="Hi All," ATTACH=/projects/psoft/hrdw/pushreports/crons/temp_out... (5 Replies)
Discussion started by: krupasindhu18
5 Replies

3. Shell Programming and Scripting

Mail Attachment...

Hi All, I am new to unix. I have written the script to identify the delimiter count for my source file and the output I have to capture in another file and that file should sent to mail with attachment. I have tried to send the attachment with below script . But I am not able to do that. Any... (2 Replies)
Discussion started by: suresh_target
2 Replies

4. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

5. Shell Programming and Scripting

Mail attachment with unix mail

Hi Could someone help me with the details on how to send an attachment through mail in unix. I have an html file in my unix machine and I want this to be send to some mail id, plese help with the steps. Regards Ajay (2 Replies)
Discussion started by: ajaykumarboyana
2 Replies

6. Shell Programming and Scripting

need help in format an attachment

i have an o/p file called "all_rep_files.txt" . Below is the command i m using in my script to send the attachement. but the problem is when the attachment is opened in oulook the contents of the attachments is in a staright line. (uuencode all_rep_files.txt all_rep_files.txt) | mail -s "All... (1 Reply)
Discussion started by: ali560045
1 Replies

7. UNIX for Advanced & Expert Users

mailx commannd - Mail and Attachment in same mail

Hi , I am using mailx command for sending the mails. Rightnow I am sending the attachment (by using uuencode $filename) as a seperate mail.I wanna send the attachment also with the same mail. (6 Replies)
Discussion started by: sharif
6 Replies

8. Shell Programming and Scripting

mail with attachment

Hi, I am facing an issue while sending a mail from unix with attachment.the issue is i am able to send a mail with attachment but...after receiving the mail if u see that the text is continous though it was line by line in original.. UUENCODE is the cmd i am using... plz help me in this... (1 Reply)
Discussion started by: param786
1 Replies

9. UNIX for Dummies Questions & Answers

mail attachment

This question has been asked many time before. I did search other questions. But was not able to work out. Really sorry for repeating the same question. I have mail and mailx and sendmail installed. It Tried this uuencode FILENAME.txt FILENAME.txt | mail mymail@yahoo.com the attachment... (3 Replies)
Discussion started by: sushrut
3 Replies
Login or Register to Ask a Question