Attaching files in Mail with HP Unix


 
Thread Tools Search this Thread
Operating Systems HP-UX Attaching files in Mail with HP Unix
# 1  
Old 06-21-2006
Attaching files in Mail with HP Unix

I am trying to attach a .xls file using uuencode in HP Unix
uuencode res1.xls res1.xls | mailx abc@xyz.com

But in the receiving end, I couldn't see the attachement, instead of it some encoded text is there in the body of mail

Can anybody suggest how to attach the files in HP Unix. I don't have MIME package installed, and we can't use.
# 2  
Old 06-22-2006
Here is a part of my script. I use this script to send a .html file as an attachment.

Code:
DIR_FILES=/yourdir
EMAIL_TO=user@user.com
EMAIL_FROM=fromuser@user.com
ATTACHED_FILE=test.html
EMAIL_SUBJECT="The subject"
EMAIL_TEXT="Your text"
E_MESS=mail.tmp


echo "To:      $EMAIL_TO" > $DIR_FILES/$E_MESS
echo "From:    $EMAIL_FROM" >> $DIR_FILES/$E_MESS
echo "Subject: $EMAIL_SUBJECT" >> $DIR_FILES/$E_MESS
echo "" >> $DIR_FILES/$E_MESS
echo $EMAIL_TEXT >> $DIR_FILES/$E_MESS

uuencode $DIR_FILES/$ATTACHED_FILE $ATTACHED_FILE >> $DIR_FILES/$E_MESS
cat $DIR_FILES/$E_MESS | /usr/sbin/sendmail -t

# 3  
Old 07-25-2006
uuencode

try this

uuencode one.xls > mailattatch
uuencode two.xls >> mailattatch
cat mailattatch | mailx -s "Subject ...." xyz@mail.com
# 4  
Old 07-25-2006
See this script in the FAQ.
# 5  
Old 07-26-2006
You can try with this script....this will show you how to enter subject ,body and attachment.

FILE_NAME="one.xls"
`cat > mail_filewatcher.log <<!
Team - Here is the action to be taken based on this mail.
Please work on the exceptions listed in the attachment to ensure.


THIS IS A SYSTEM GENERATED E-MAIL...PLEASE DO NOT REPLY.
!`
uuencode ${FILE_NAME} ${FILE_NAME}>>mail_filewatcher.log
mailx -s "enter your subject " mailid@xyz.com < mail_filewatcher.log
# 6  
Old 07-26-2006
am I the only guy that uses mutt?

mutt is your friend Smilie

creating test attachment file
$ echo "this is the attachment file" > attatch.file
creating test body file
$ echo "this is the body" > body.file

sending mail w/following command
$ mutt -a attatch.file -s "this is the subject" user@emailADDY.com <body.file
# 7  
Old 07-27-2006
no i tried this and i did not recvd any attachments in the mail... instead i recvd ...... the content of the file in the body of the mail...............


can anyone guide me .... how could i send a file as an attachment thru unix to outlook...... or any mailbox?????

regards,
vangalli
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How can I send a mail from my outlook or other mail accounts to UNIX server?

Hi all, I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can send from the unix server to my outlook account, I can't send from outlook to unix. How can I achieve this ? How can I send a mail from my outlook or other... (2 Replies)
Discussion started by: igelegin
2 Replies

2. Shell Programming and Scripting

Mail not attaching the attachment when schedule in crontab

Hi , Iam want to send the mail with attachment , iam using below in my script uuencode /path/pathname/filename filename.csv | mailx -s "subject of mail" vinoth@xxx.com when i trigger the script manually from command prompt i can get with the attachment but when i schedule it in crontab... (4 Replies)
Discussion started by: vinothsekark
4 Replies

3. Shell Programming and Scripting

Attaching two text files in two different sheet in same excel

Hi, My requirement is to get attach two different text file contents to two different sheets in same excelsheet. Also, is there any way we can name the tabs as desired ? Kindly assist. (2 Replies)
Discussion started by: sanjaydubey2006
2 Replies

4. Web Development

Attaching " Thank You " pop-up window in php form mail code

Dear Sir, I have got a php mail form code. Using this code, I want to use the JavaScript for " Thank You " pop-up window in the php form mail code. Where do I add the pop-up JavaScript for "thank you" ? My code is as follows: <?php //--------------------------Set these... (1 Reply)
Discussion started by: swapan
1 Replies

5. Shell Programming and Scripting

attaching file in mail command from shell script

Hi all, Currently in shell script i am using the following command to send mail echo "Certain assets are not loaded properly. PFA the result of the DataLoad" | mail -s "Weekly DataLoad - Failure Notification !!" $MAILINGLIST I need to attach a file along with that. How should i handle this... (7 Replies)
Discussion started by: ananthi_ku
7 Replies

6. Shell Programming and Scripting

Problem in attaching CVS file to the mail

i wrote this code(( cat $REPORT_EMAIL;uuencode <$OUTFILE $OUTFILE ) | mailx -s "Auto Policy Attach Report Before batch job " $SUPPORT_EMAIL_GRP) in my shell script to attach afile but in the mail i donot get a attachment contais of the mail is Auto Policy Attach Report Before batch job... (0 Replies)
Discussion started by: alokjyotibal
0 Replies

7. Shell Programming and Scripting

excel drops leading zeros while attaching through unix

HEllo All, when the data file is being attached and mailed as file1.csv, the column data( e.g: 88E00, 99E00, 77F12, 66H18). The data 88E00 and 99E00 is being converted to 88E+01, 99E+01. All other data is fine. I need the file attached as .csv from unix only. Is there a way we can manage... (2 Replies)
Discussion started by: OSD
2 Replies

8. Shell Programming and Scripting

attaching the file to mail

Hi, In my script, i am using tar to combine 2 files, so that i can attach it to the mail. everything is working fine and sending the mail successfully. But, when i save the file to desktop and unzip it. a series of directories are there and finally those tar files are there. i am using tar -cf... (1 Reply)
Discussion started by: javeed7
1 Replies

9. UNIX for Dummies Questions & Answers

Can you e-mail files as attachments from unix to windows?

Another question if you guys don't mind, if you do this: cat * |mailx -s xxxxx <email> it will send files to a email address displayed as sdout, is there a quick way to send files to a e-mail address but as a attachement? Say if I renamed files to .xls on unix, and sent them to a e-mail... (4 Replies)
Discussion started by: nj78
4 Replies

10. UNIX for Dummies Questions & Answers

can not send mail from unix server to company/yahoo mail

hi, Gurus, I need some help with sending mail out from my UNIX server: It is running Solaris 2.6 and the sendmail version is 8.8. Output of :/usr/lib/sendmail -d0.1 -bt < /dev/null Version 8.8.8+Sun Compiled with: LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET ... (5 Replies)
Discussion started by: b5fnpct
5 Replies
Login or Register to Ask a Question