Get attachments during an asynch OnSave event
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook Forum
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Get attachments during an asynch OnSave event
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Alex
Guest





Posted: Fri Dec 23, 2005 1:58 am    Post subject: Get attachments during an asynch OnSave event Reply with quote

Hi,
I wrote a copy object to process an email as it's being saved into a public
folder. Information about it is placed into a SQL db
The code is attached to an asynch onSave event.
At this point, I need to see what (if any) attachments this email has, and
list their names.

I can see if there are attachments by checking oRecord.Fields[
"urn:schemas:httpmail:hasattachments" ].Value
However, I don't get any specific attachment information from the Fields of
the record

I tried to use OOM, but the item doesn't exist yet.
CDO gave me an issue with the MessageClass.Open or
MessageClass.DataSource.Open()
according to MS docs, RecordOptions must be set to adOpenAsynch. But I get
an run time exception telling me that Asynchronous binding is not supported
by the provider. Regardless, I feel that even if I figure out how to open
it, the item still won't be there..
MS docs are here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_cdo_idatasource_openobject.asp

What am I missing here? Is there a way to get this out of the Fields
collection of the ADO record?

oRecord is defined as follows
public void OnSave(Exoledb.IExStoreEventInfo pEventInfo, string bstrURLItem,
int lFlags) {
// Get the EventInfo and convert it so we can use it
Exoledb.IExStoreDispEventInfo pNewEventInfo =
(Exoledb.IExStoreDispEventInfo)pEventInfo;
// Cast an ADODB record.
ADODB.Record oRecord = (ADODB.Record)pNewEventInfo.EventRecord;

Thanks in advance
Alex

Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Access Forum - Dedicated Servers

Contact Us Powered by phpBB