I am writing an agent that will run in an application on the server when new mail is received. Each mail message will have an attached text file and I need to read the first couple lines of the file to process the message.
If this agent was running on a client machine I would detach the attachment to a temporary file, read the temporary file, delete the temporary file, and continue processing. However, I don't believe the agent will be allowed to write to the server's hard drive, so I need a way to read the attachment without detaching it first.
Can that be done?