in reply to Emailing attachments.

"The code is very long to add here. Let me know which parts you need i can give them."

<sarcasm>We need that part that's broken.</sarcasm> On a serious note, create a cut down version of your script, providing code which replicates the problem.