UUEncode Attachment Missing

Hi All,

  I have created a shell utility that runs various database jobs and then mail the output of the database jobs to the customers. This is a generic utility and executes almost 15 reports and sends the results out. To send the attachment I use uuencode. This had been working fine till the script encountered a large file and the corresponding email that went out had the encoded text only. 

I am pasting herewith part of the encoded text in the email

I am herewith attaching the code that encodes and mails the file.

(cat ${SUC_Template}.${DATE_TIME}.$$.tmp;uuencode ${ZIPFILE} "${SQL_NAME}.zp") | mailx -n -s "${SUBJECT}" ${BizEMailAddr}

This code works properly with 14 of the files but not with the 15th one. The only difference I had noticed is that the filesize generated with the 15th SQL file is very huge.

Any help would be highly appreciated.

Thanks a lot.

Thanks and Regards
AnonymousUser45

If its not working what error it throws , can you explain more about it

The error is where I was expecting the attachment I got the encoded text. The encoded text that I was seeing in the email is shown above and the script line that does the encoding and mailing is also shown.

I get exactly the same effect with a small text file and using your script. The uuencoded file appears in the mail body not as an attachment.

If change the mailx switch "-n" to "-m" it works.

Btw. How big is "huge"?

Hi Methyl,

 My mailx installation is /usr/bin/mailx and it does not accept the -m switch. It might be because I am on Sun OS release 10.
System = SunOS
Node = *********
Release = 5.10
KernelID = Generic_127111-09
Machine = sun4u
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 8

As far as the definition of huge is concerned, it was a relative one in this context (Huge amongst the 15 of the SQL reports). The actual size of the zip file was around 350K and the original data file was around 5.6M.

I am not sure why it fails for this guy but works for the rest14 :frowning: .

Thanks and Regards
-Nony