|
|
|
date: Sun, 3 Jul 2005 23:07:08 +0200,
group: microsoft.public.exchange2000.development
back
Generating Task Items for Incoming ICalendar Messages in a Sink
Hello,
we have a SAP-System from which we want to assign Task to Outlook-Users.
The plan is to generate email-Mesages which contains a ICalendar in SAP and
convertt them in a Microsoft Exchange 2000 Sink to Task-Items.
I have registered a Sink with the Micosoft Script smtpreg.vbs which
sucessful fires the following script:
<SCRIPT LANGUAGE="VBScript">
Sub IEventIsCacheable_IsCacheable
end sub
sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)
dim envFlds
dim colAttachs
dim iFound
set envFlds= Msg.EnvelopeFields
set fs = CreateObject("Scripting.FileSystemObject")
fn = "C:\EventSink\vbs-out.txt"
set file = fs.CreateTextFile(fn, True)
for each envFld in envFlds
file.WriteLine(envFld.Name & ":")
file.WriteLine(envFld.Value)
Next
file.WriteLine("---- Attachments ----")
set colAttachs = Msg.Attachments
for each oAttach in colAttachs
file.WriteLine(oAttach.FileName)
Next
file.WriteLine("---- Configuration ----")
set myConfiguration=Msg.Configuration
for each confFld in myConfiguration
file.WriteLine(confFld.Name & ":")
file.WriteLine(confFld.Value)
Next
file.Close
end sub
</SCRIPT>
This gives me the Envelope-Fields and Attachments. For the beginning i
submitted a Meeting-Request from Outlook, this doesn't give me a attachment
in my Sink. When i look at the message source, there is some encoded
MAPI-Stuff in it which i can't parse.
I am at the very beginning, i even don't get the fields for the calendar
entries, nor does i have the possibilities to change the schema of the
fields, so that they belong to a Task-Item. I additionally found that there
is no Task-Item in CDO 1.2.1(Meeting Item is present).
I can't found any Examples for me at google or msdn. I'am currently thinking
to get a ADO.Record over the Message.Datasource Property.
But i you have no hints, i will give up this project due to the lack of
documentaion, to parse a messages in a sink.
Regards
Winfried Wille
date: Sun, 3 Jul 2005 23:07:08 +0200
author: Winfried Wille
Re: Generating Task Items for Incoming ICalendar Messages in a Sink
When your sending the message from Outlook (or OWA) its going to be in TNEF
format to decode this you would need to look at using Extended MAPI (in C++)
to do this, there are also a few third party TNEF decoders out there as well
you might want to have a look at. The other option is to deliver it to the
store which will decoded it. If your SAP System sends the Ical message in
RFC-822 format then you shouldn't have an issue as the ical body part should
be in clear text.
The Outlook Object Model is the only supported API for creating tasks all
the other Exchange API's CDO1.2,CDOEX and WebDAV can be used to create tasks
using a few workarounds if you do a search of this group (via google) you
should find samples for each API. Also have a look at
http://www.cdolive.com/cdo10.htm which documents the property tags for
tasks.
Cheers
Glen
"Winfried Wille" wrote in message
news:ua2CDDGgFHA.1444@TK2MSFTNGP10.phx.gbl...
> Hello,
>
> we have a SAP-System from which we want to assign Task to Outlook-Users.
> The plan is to generate email-Mesages which contains a ICalendar in SAP
> and convertt them in a Microsoft Exchange 2000 Sink to Task-Items.
> I have registered a Sink with the Micosoft Script smtpreg.vbs which
> sucessful fires the following script:
>
> <SCRIPT LANGUAGE="VBScript">
>
> Sub IEventIsCacheable_IsCacheable
> end sub
>
> sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)
> dim envFlds
> dim colAttachs
> dim iFound
>
> set envFlds= Msg.EnvelopeFields
>
> set fs = CreateObject("Scripting.FileSystemObject")
> fn = "C:\EventSink\vbs-out.txt"
> set file = fs.CreateTextFile(fn, True)
> for each envFld in envFlds
> file.WriteLine(envFld.Name & ":")
> file.WriteLine(envFld.Value)
> Next
> file.WriteLine("---- Attachments ----")
> set colAttachs = Msg.Attachments
> for each oAttach in colAttachs
> file.WriteLine(oAttach.FileName)
> Next
>
> file.WriteLine("---- Configuration ----")
> set myConfiguration=Msg.Configuration
> for each confFld in myConfiguration
> file.WriteLine(confFld.Name & ":")
> file.WriteLine(confFld.Value)
> Next
>
>
> file.Close
> end sub
> </SCRIPT>
>
> This gives me the Envelope-Fields and Attachments. For the beginning i
> submitted a Meeting-Request from Outlook, this doesn't give me a
> attachment in my Sink. When i look at the message source, there is some
> encoded MAPI-Stuff in it which i can't parse.
> I am at the very beginning, i even don't get the fields for the calendar
> entries, nor does i have the possibilities to change the schema of the
> fields, so that they belong to a Task-Item. I additionally found that
> there is no Task-Item in CDO 1.2.1(Meeting Item is present).
>
> I can't found any Examples for me at google or msdn. I'am currently
> thinking to get a ADO.Record over the Message.Datasource Property.
>
> But i you have no hints, i will give up this project due to the lack of
> documentaion, to parse a messages in a sink.
>
> Regards
> Winfried Wille
>
date: Tue, 5 Jul 2005 11:49:55 +1000
author: Glen Scales [MVP]
|
|