Email multiples attachment files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Email multiples attachment files
# 1  
Old 01-31-2006
Email multiples attachment files

I have a program the will split a large file into smaller files. It works great. I, however, have problem of email these file out to other people:

I may have 1 or more files afer SPLIT

datafileaa
datafileab
datafileac

manually:

mailx -s "data" email@email.com<datafileaa
mailx -s "data" email@email.com<datafileab
mailx -s "data" email@email.com<datafileac

and or so on

how can I create a program the will email all these files to other.

This doesn't work:

( echo "Your message goes here"
for file in /path/to/file*
do
uuencode $file $(basename $file)
done
) | mailx -s "Your Subject" email@mail.com

Can someone help?
# 2  
Old 01-31-2006
don't work means what ? are you getting some error or not gettting the email ??

your code is working for me, can see email as well with multiple attachments
# 3  
Old 01-31-2006
# 4  
Old 01-31-2006
I have this error:


./email: syntax error at line 4: `(' unexpected
# 5  
Old 02-01-2006
which shell you are using ?? try ksh
# 6  
Old 02-01-2006
Sorry to ask this...but how can I find out which SHELL?

many thanks!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Attachment in email

I have a file in unix, while i do email that file to some one from unix, the attachment file data is displaying in the email. (as body of the email). but if the file has some special characters , the file is emailing as attachment. But i need the file as the body in the email if it has special... (1 Reply)
Discussion started by: nani1984
1 Replies

2. Shell Programming and Scripting

Not able to send attachment with the email

Hi All, The below code is working fine for me. mailx -s hello abc@xyz.com <<EOT Hello !!! How are you? Regards Rahul EOT But i am not able to send csv file with the mail .Getting just themail but not the attachment. uuencode /path/s1.csv | mailx -s hello abc@xyz.com <<EOT... (9 Replies)
Discussion started by: rafa_fed2
9 Replies

3. Solaris

Sent an email attachment, but the attachment is empty

I'm trying to send a .zip file from my unix box to my work email (email client outlook) The file name that I'm trying to sent is sites.zip and this is how I do it: uuencode sites.zip | mailx -s "testing" myname@mydomain.com When I open the .zip, the zip is empty. Looking around the we, I... (17 Replies)
Discussion started by: amb1s1
17 Replies

4. Shell Programming and Scripting

awk on multiples files

Ques from newbie I want to total column X from large number of files, and view totals for each file separately with the filename. I have tried: for i in `ls -1 *.pattern`; do cat "$i" | awk '{SUM += $4} END { printf("%8d\t%8d\n", $i,SUM) }'; done does not work. appreciate your help (5 Replies)
Discussion started by: analyst
5 Replies

5. Shell Programming and Scripting

Extracting/condensing text from multiple files to multiples files

Hi Everyone, I'm really new to all this so I'm really hoping someone can help. I have a directory with ~1000 lists from which I want to extract lines from and write to new files. For simplicity lets say they are shopping lists and I want to write out the lines corresponding to apples to a new... (2 Replies)
Discussion started by: born2phase
2 Replies

6. UNIX for Dummies Questions & Answers

Using cp for copying multiples files

Hi all, I've got this question about using cp for copying multiples files from the same source directory to another directory, considering that my working directory ain't the same of the source directory. Let me give you a simple example what I'm talking about: Suppose the following files... (2 Replies)
Discussion started by: chapeupreto
2 Replies

7. AIX

Email with Attachment

Hi, I have .ksh file which internally calls a .sql file. This sql file writes a file with the result. I am using the following command to send email with the result file as attachment uuencode file.txt file.txt | mail -s "Subject" abc@abc.com. When i run the .ksh file i get a message you... (5 Replies)
Discussion started by: piyushprabhakar
5 Replies

8. UNIX for Dummies Questions & Answers

how to deattach attachment of email

how to deattach attachment of email (4 Replies)
Discussion started by: kandati
4 Replies

9. UNIX for Dummies Questions & Answers

Email Attachment

Is there a way to send an email attachment? So far no where I've looked has given me any leads. (2 Replies)
Discussion started by: Cyro
2 Replies

10. UNIX for Dummies Questions & Answers

Email Attachment

Hi, I have 2 questions regarding sending mail as attachment. 1. Using mime type (From Oracle tools which reside on UNIX) When send the mail(txt file) as an attachment, on some servers like Hotmail, the email goes perfect as an attachment. But on some servers like yahoo, get embedded mail which... (2 Replies)
Discussion started by: prasad01
2 Replies
Login or Register to Ask a Question