I have 1 question: if the e-mail has only 1 part (the body of the msg), the .doc file is created, @parts is empty, and the file never gets deleted on the "for $part (@parts)" loop. Is there a way to get the name of the file when there are no attachments?