Mail command --> send multiple attachments


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mail command --> send multiple attachments
# 1  
Old 04-05-2014
Mail command --> send multiple attachments

Hi,

i try to send two (multiple) files by the mail-console-command
Code:
mail -s TEST  -a f1.pdf f2.pdf  n.ame@ms123.de

but it doesn't work. can someone give me a hint?

Thanks in advance,
IMPe
# 2  
Old 04-05-2014
Hi.

You can use one -a option per file.

Also, if by "not working" you mean it appears to "hang", it's because it's reading from standard input for the message body.
# 3  
Old 04-05-2014
Quote:
Originally Posted by Scott
Hi.

You can use one -a option per file.

Also, if by "not working" you mean it appears to "hang", it's because it's reading from standard input for the message body.
Thanks a lot Scott,
now i have understand that every attaching file must have a seperate
Code:
-a

. Now it works properly!

Thanks
IMPe
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to send mail with attachments in hpux server?

I am trying to send a mail alongwith attachments in hpux server. Its not throwing any error but it seems the command is still running,neither its sending the mail. The commands i am using is- uuencode 00PZ00000012OHJMA2.csv | mailx -s "Hello" abc@hp.com uuencode Shell_Script_Sample.ksh |... (1 Reply)
Discussion started by: saga20
1 Replies

2. Red Hat

How to send mail with multiple attachments?

We don't have uuencode installed in our machines..... Please tell me how to send mail with multiple attachments ??? URGENT !!!!! Please tell me using command line (or) scripts.......... please...... Thanks in Advance.... (1 Reply)
Discussion started by: vamshigvk475
1 Replies

3. Shell Programming and Scripting

How to send email with multiple attachments ?

Hello , I am trying to send an email with two attachments . I have tried all previous suggestion in this forum but none worked. I could send one attachment in an email by uuencode $file "$file" | mailx -m -s "File" xxx@xx.com but unable to send multiple attachments . I have tried ... (8 Replies)
Discussion started by: RaviTej
8 Replies

4. Shell Programming and Scripting

How to attach multiple file to send mail command

Hi, i want color effect on mail as well as multiple attachment.I have code but this code is used for single attachment. I am unable to attach more than one file.:wall: I want to send two attachments -ahmed.csv and ahmed1.csv . Sample content: <html> <body> <b> Hi...</b> </body> </html> ... (1 Reply)
Discussion started by: AhmedLakadkutta
1 Replies

5. Shell Programming and Scripting

Not able to send multiple attachments using uuencode and mailx

Hi, I am seeing some junk characters when I attach the second file, given below is the logic I used. Please help me resolving the issue. ( uuencode file1.txt file1.txt.lst && uuencode file2.txt file2.txt.lst ) > attachment.txt cat body.txt attachment.txt > combinemail.txt mailx -m... (7 Replies)
Discussion started by: prasperl
7 Replies

6. UNIX for Advanced & Expert Users

send attachments using send mail in Solaris

Hi All, I have a requirement to send and email of body html with an attachment. concatinating uuencode output to the mail body with mailx command works, but as my Email body is of HTML type i use sendmail. my command to send HTML body is as below: export MAILTO="recipient@domain.com"... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies

7. AIX

Send mail attachments and have a mail body

Hi, How can I send mail attachments from shell script (AIX) and have a mail body as well ? Thanks in advance. (1 Reply)
Discussion started by: shibajighosh
1 Replies

8. UNIX for Dummies Questions & Answers

Help ! How to get elm to send multiple attachments - in batch mode

From a program, I want to execute a UNIX elm command that will send multiple txt attachment files to an email address. I can do it for one attachment only ie. "elm -s"subject" emailaddress < attachment.txt" 1. The attachment is received in the body of the email and not as an attachment. 2. The... (1 Reply)
Discussion started by: anarvan
1 Replies

9. Shell Programming and Scripting

Send mail with attachments automatically in a interval period

hai everyone I want to send mail with attachments automatically for every 15 minutes getting different E-mail IDs from a file if any script is available , Please send to me .. This will be very useful for my project.... Thanks for your time..... Felix ... (3 Replies)
Discussion started by: Leo Felix
3 Replies
Login or Register to Ask a Question