![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sending multiple attachments | deo2k8 | Shell Programming and Scripting | 1 | 01-07-2008 10:12 PM |
| Sending Attachments Through mailx | vrk1219 | HP-UX | 4 | 08-27-2007 08:06 AM |
| sending attachments via unix | Abhishek Ghose | UNIX for Advanced & Expert Users | 6 | 09-30-2005 01:49 PM |
| sending files as attachments | SmartJuniorUnix | How do I send email? | 9 | 04-13-2001 04:34 AM |
| sending files as attachments | SmartJuniorUnix | UNIX for Dummies Questions & Answers | 9 | 04-13-2001 04:34 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi ,
i have tried the following command to send an email with an attachment its working fine but i am getting mail with the embeded content inside the mail that too truncated. i wanted it as an attachment. /usr/lib/sendmail -F "MAC SIA" address "rajendra@abc.com.sg" -t < /prod/applc/ds_data/mac/working/nullctry.txt regards Rajesh |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Hi, for that you could use "uuencode" and "mail" commands:
Code:
(cat text.txt; uuencode /prod/applc/ds_data/mac/working/nullctry.txt /prod/applc/ds_data/mac/working/nullctry.txt) | mail rajendra@abc.com.sg - text.txt contains the body of the email, so this is optional. - /prod/applc/ds_data/mac/working/nullctry.txt is the file you want to attach. |
|
#3
|
|||
|
|||
|
thanks but the output is not in desired format
Hi grail,
i have used both the scripts (cat nullctry.txt; uuencode /prod/applc/ds_data/mac/working/nullctry.txt /prod/applc/ds_data/mac/working/nullctry.txt) | mail RajendraP_Gora@abc.com.sg and also (cat nullctry.txt; uuencode nullctry.txt </prod/applc/ds_data/mac/working/nullctry.txt ) | mail RajendraP_Gora@abc.com.sg i could get the attachment. the problem is the lines are continious for eg the original is 1,2,3,4 a,b,c,d x,y,z,i but in mail the attachment is like this 1,2,3,4a,b,c,dx,y,z,i thanks for your response Reagards Rajesh |
|
#4
|
|||
|
|||
|
what is the need for seperate cat and then to use uuencode for that..
if your file is content then use it as uuencode content content.txt and then with mail -- this should work |
|
#5
|
|||
|
|||
|
Rajendra
Do you mean that the contents of the original attached file varies from that you got in the mail? If your answer is yes, I am surprised. What I have used for this purpose is the one given below and always I used to get the file as it is. uuencode FileNameWithPath "AttachmentName" | mailx -s "MailSubject" MailAddress For example If I send the File abcd.xls as uuencode /home/usr/bb/abcd.xls "AttendanceList.xls" | mailx -s "List Of Attendance" rajendra@yahoo.com Then the file abcd.xls will be attached in the mail with the name AttendenceList.xls and the mail subject will be - List Of Attendance. Hope this helps. Thank you |
|
#6
|
|||
|
|||
|
Thanks a lot bobby it works fine for csv :)
Thanks a lot bobby it works fine for csv
i changed it to csv and it works fine . but for txt same problem any way my problem is resolved thanks a lot Regards Rajesh |
|
#7
|
|||
|
|||
|
When i sent with an attachment(text file), the format for my text file is incorrect. Some of the fields went to the next line. I have already changed unix2dos.If i use EditPlus or UltraEdit to open this file, the format is what i want.How can i ensure that the text file is long enough to contain the format that i want ?
unix2dos -ascii $sqloutfile $emailoutfile |
|||
| Google The UNIX and Linux Forums |