|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Mail with attachment
hi
i have a script in sh/ksh in the script i am making 2 files that i want to mail out at the end of the script one file need to be an attachment and the other should be the body of the mail i have tried to find a way do to it and the only way i found worked on SUN and AIX platform i need my script to run on HP-UX and HP-ITANIUM also my mail commands that i have on my servers are: mail ,mailx,sendmail the method i found is as follows: attach_file=attchment.txt #the attachment body=output.txt #the body uuencode $attach_file $attach_file > temp_attachment cat $body $temp_attachment > combination_file mail -s "the subject" <mail_to> < combination_file rm -fr temp_attachment combination_file again this works only in AIX and SUN please help to provide some solution for HP platform 10x |
|
#2
|
|||
|
|||
|
the problem is with the flag -m
-m Do not add MIME header lines Mime Version, Content Type & Content Encoding to the header information while sending mails. in HP we need to add flag -m to mailx command in SUN and AIX this is the default |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Mail with attachment |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|