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