Can LotusScript read an attached file without detaching?

5 pts.
Tags:
Lotus Agents
LotusScript
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?
ASKED: January 31, 2008  10:04 PM
UPDATED: February 7, 2008  10:47 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I can’t see how you’d do it before new mail arrives, but if you are looking at AFTER new mail arrives, you should be able to export the entire document as DXL to a NotesDOMParser. You will be looking for a <filedata> node. The filedata in the node will be Base64-encoded. You can create a temporary in-memory document with a NotesMIMEEntity for a body to decode the filedata to a normal LS string.

Yes, that’s a bit of working around, but if you need to avoid the file system, it’s the only way to go.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following