hmm. rather than doing the second line with the 'cat temp' part, try opening up a sendmail pipe, printing to it the 'To:', 'Subject:', &c. parts, then opening up the temp file you made with uuencode, and printing it into the sendmail pipe. you may have to have a different header on the body of your mail ('multi-part/form' maybe?), but that way you'll have control over the subject line of the mail. also, i think you can include a subject in the initial calling of sendmail, which you could more easily encorporate into your script. "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."