send mail from AIX unix with multiple attachment


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting send mail from AIX unix with multiple attachment
# 1  
Old 02-21-2011
send mail from AIX unix with multiple attachment

Hi,

I have the below code for sending email from AIX unix.
I need the body of the mail should content of errornotify.txt file. i tested with cat errornotify.txt, it is not working...Also i need multiple attachments.

Can you please help me out on this.
Code:
(
echo "From:cus@xxx.xx.com"
echo "To: r.sivasankar@xxx.com"
echo "MIME-Version: 1.0"
echo "MIME-Version: 1.0"
echo "Subject: Notification Mail"
echo "Content-Type: text/plain;"
echo "Content-Disposition: attachment;"
echo " filename=RCI_VST_PROCESS_DETAILS_20110218_063244.csv"
echo "Contents"
cat errornotify.txt
) |sendmail -vt


Regards,
Siva

---------- Post updated at 03:33 AM ---------- Previous update was at 01:17 AM ----------

Please help me out in this

Last edited by rsivasan; 02-21-2011 at 04:34 AM.. Reason: Please use code tags
# 2  
Old 02-21-2011
What exactly is not working?
To see how mails with attachments are sent, search the forum for words like "mail attachment uuencode" since this is a very common question.
In your example there is no recipient specified.

Also maybe just use the mail command instead of sendmail.
# 3  
Old 02-21-2011
Thanks Zaxxon...I know how to send mail with "Mail and Mailx" command...i just want use sendmail command...
in my previous scrap i clearly mentioned, multiple file attachement not working.
# 4  
Old 02-21-2011
So if it is only attaching multiple files, please have a look at the part of my answer addressing that problem already:
Quote:
To see how mails with attachments are sent, search the forum for words like "mail attachment uuencode" since this is a very common question.
What is not clear from that?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Send mail using attachment

Hi All, I need to send mail with attachment. I am using uuencode but it seems it is sending encoded file. I am getting the mail with attachment but there is no data even the file size is almost 90KB. Please help. Thanks. (3 Replies)
Discussion started by: unankix
3 Replies

2. Shell Programming and Scripting

How to send mail with attachment in Unix

Hi All, Is it possible to send mail in Unix with attachment. If yes, then how?? (8 Replies)
Discussion started by: parthmittal2007
8 Replies

3. AIX

How to send large file through E-mail IN Unix AIX

hI ALL, I am newbie to Unix.There are 2 GB files in UNIX that should be sent to one of my friend who is working on Windows Environment.Is there any way to send these file to him? By Compressing like that? Can anyone help on this? With thanks, Aravindh (4 Replies)
Discussion started by: Aravindhbabu
4 Replies

4. Shell Programming and Scripting

how to run a script using cron job and send the output as attachment via e-mail using unix

how to run a script using cron job and send the output as attachment via e-mail using unix. please help me. how my cron job entry should be? As of now my cron job entry is to run the script at specific time, 15 03 * * * /path/sample.sh | mail -s "Logs" email_id In the above entry, what... (8 Replies)
Discussion started by: vidhyaS
8 Replies

5. 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

6. Shell Programming and Scripting

How to send a mail with attachment?

Hi, I usually write a file TEST.MAIL like this to send mails: Importance: High Priority: Urgent X-Priority: 1 (Highest) From: user Subject: error ... text body .... and then I launch it (or writre a c-chell that launchs it) by writing: mail a@b.com < /users/.../TEST.MAIL How can... (4 Replies)
Discussion started by: albaalbetti
4 Replies

7. Shell Programming and Scripting

how to send a attachment mail in unix

hi, i have the code as below #!/bin/sh MAIL=/usr/bin/Mail Mail_addr="aaa@bb.com" Mail_file="/home/delta/dev/aa.doc" ${MAIL} -s " health check" ${Mail_addr} < ${Mail_file} (6 Replies)
Discussion started by: mail2sant
6 Replies

8. AIX

Send email from unix (AIX) with PDF attachment

I am using the following command to send PDF attachment with a mail. uuencode <attachment.pdf> <attachment.pdf>|mailx -s <subject> <mail_id> < <Message_file.txt> This one send the message with attachment. I would like send PDF attachment with the mail Can any one help with this issue ? ... (0 Replies)
Discussion started by: sunjup
0 Replies

9. UNIX for Dummies Questions & Answers

AIX send mail with HTML message body and a binary attachment

I'm trying to script sending an e-mail message on an AIX 5.x server with the following requirements: 1. command line switch to specify file name containing message body in HTML format 2. command line switch to specify file name of a binary attachment 3. command line or input file to specify... (4 Replies)
Discussion started by: G-Man
4 Replies

10. AIX

How to send a mail with an attachment from AIX 5.2 OS?

Has anyone written a script to attach a file when sending an email using the mailx command? (1 Reply)
Discussion started by: mintu41
1 Replies
Login or Register to Ask a Question