| Author |
Message |
Chris McKay
Guest
|
Posted:
Wed Nov 09, 2005 7:59 am Post subject:
Custom Fields go missing on a Message forward |
|
|
Hi,
I have a Event Sink working on Exchange 2k3. I have a custom Outlook form
that has some additional fields within the Meeting/Appointment form.
The sink fires when a meeting request arrives at the appropriate mailbox
from Outlook. The custom field values can be accessed from the Appointment
object like so:
appt.Fields[ "ConferencePIN" ].Value
I'm now enhancing the application so that in a certain circumstance the sink
forwards the meeting request to another mailbix. This mailbox also has a
sink attached. When the meeting request arrives, all custom fields are
missing.
To forward the meeting request I have tried many things.
From the simple (app is written in c#):
CDO.IMessage msg = calMsg.Message.Forward();
msg.From = myMboxAddress;
msg.To = newMboxAddress;
msg.Send();
to the more complex:
CDO.CalendarMessage cMsg = appt.Invite(newMboxAddress); // Also tried
CreateRequest here
plus a whole bunch of resetting the appt fields, Updating, saving to
containers etc.
cMsg.Message.Send();
It seems that just prior to the message leaving the appointment object has
the correct values but once gone, they disappear.
Anyone with any ideas?
Chris
|
|
| Back to top |
|
 |
Glen Scales [MVP]
Guest
|
Posted:
Thu Nov 10, 2005 1:58 am Post subject:
Re: Custom Fields go missing on a Message forward |
|
|
You need to make sure that when your sending the message your sending using
Exchange (using the Exchange Mail Submission Uniform Resource Identifier)
this isn't the default for CDOEX (default is SMTP) if you use SMTP then MAPI
properties wont persist. So you need to make sure you include a
configuration object and set the
http://schemas.microsoft.com/cdo/configuration/mailboxurl and
http://schemas.microsoft.com/cdo/configuration/sendusing in your code for a
sample have a look at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_cdo_sending_a_meeting_request.asp
Cheers
Glen
"Chris McKay" <chris_mckay@hotmail.com> wrote in message
news:eD$AKFN5FHA.4012@TK2MSFTNGP14.phx.gbl...
| Quote: | Hi,
I have a Event Sink working on Exchange 2k3. I have a custom Outlook form
that has some additional fields within the Meeting/Appointment form.
The sink fires when a meeting request arrives at the appropriate mailbox
from Outlook. The custom field values can be accessed from the Appointment
object like so:
appt.Fields[ "ConferencePIN" ].Value
I'm now enhancing the application so that in a certain circumstance the
sink forwards the meeting request to another mailbix. This mailbox also
has a sink attached. When the meeting request arrives, all custom fields
are missing.
To forward the meeting request I have tried many things.
From the simple (app is written in c#):
CDO.IMessage msg = calMsg.Message.Forward();
msg.From = myMboxAddress;
msg.To = newMboxAddress;
msg.Send();
to the more complex:
CDO.CalendarMessage cMsg = appt.Invite(newMboxAddress); // Also tried
CreateRequest here
plus a whole bunch of resetting the appt fields, Updating, saving to
containers etc.
cMsg.Message.Send();
It seems that just prior to the message leaving the appointment object has
the correct values but once gone, they disappear.
Anyone with any ideas?
Chris
|
|
|
| Back to top |
|
 |
Glen Scales [MVP]
Guest
|
Posted:
Mon Nov 14, 2005 1:58 am Post subject:
Re: Custom Fields go missing on a Message forward |
|
|
You need to make sure that you set the configuration object on the msg
object that is created by the forward method I don't think the configuration
will persists from the appointment object. see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_cdo_forwarding_a_meeting_request.asp
Instead of using the message body another workaround would be to just to use
a custom x-header in the new message, that said Mapi properties should
persist if your sending using Exchange a good way to tell if this is
happening if you set the savesentitems
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_cdo_schema_configuration_savesentitems.asp
you will get a copy of the message that is being forwarded saved in the sent
items. This may help you track down what might be going wrong.
Cheers
Glen
"Chris McKay" <chris_mckay@hotmail.com> wrote in message
news:%23KCUG3J6FHA.3592@TK2MSFTNGP12.phx.gbl...
| Quote: | Thanks for that Glen,
That makes perfect sense. However I'm still struggling to get the message
forwarded correctly.
I get the CalendarMessage by opening the DataSource on the bstrURL that
comes in on the sink, then I iterate the CalenderParts to get the
appointment. Then I am currently using the following code:
appt.Configuration.Fields[CDO.CdoConfiguration.cdoSendEmailAddress].Value
= myMboxAddress;
appt.Configuration.Fields[CDO.CdoConfiguration.cdoMailboxURL].Value =
bstrURLItem.Substring(0, bstrURLItem.LastIndexOf(config.ExchInboxString));
// this is the value -
"file://./backofficestorage/defacto.local/MBX/chris"
appt.Configuration.Fields[CDO.CdoConfiguration.cdoSendUsingMethod].Value =
CDO.CdoSendUsing.cdoSendUsingExchange;
appt.Configuration.Fields.Update();
appt.DataSource.SaveToContainer(calendarLocation, null,
ConnectModeEnum.adModeReadWrite,
RecordCreateOptionsEnum.adCreateOverwrite,
RecordOpenOptionsEnum.adOpenSource, "", ""); // tried with and without
this ...
CDO.IMessage msg = cm.Message.Forward();
msg.From = myMboxAddress;
msg.To = newMboxAddress;
msg.Send();
At the other end, the custom fields don;t show. In the mean time, I'm
shoving the custom fields in the TextBody section of the message in a
truely horrible hack that I hope never sees the light of day.
"Glen Scales [MVP]" <gscales@outlookexchange.com> wrote in message
news:OkRhnIZ5FHA.3136@TK2MSFTNGP09.phx.gbl...
You need to make sure that when your sending the message your sending
using Exchange (using the Exchange Mail Submission Uniform Resource
Identifier) this isn't the default for CDOEX (default is SMTP) if you use
SMTP then MAPI properties wont persist. So you need to make sure you
include a configuration object and set the
http://schemas.microsoft.com/cdo/configuration/mailboxurl and
http://schemas.microsoft.com/cdo/configuration/sendusing in your code
for a sample have a look at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_cdo_sending_a_meeting_request.asp
Cheers
Glen
"Chris McKay" <chris_mckay@hotmail.com> wrote in message
news:eD$AKFN5FHA.4012@TK2MSFTNGP14.phx.gbl...
Hi,
I have a Event Sink working on Exchange 2k3. I have a custom Outlook
form that has some additional fields within the Meeting/Appointment
form.
The sink fires when a meeting request arrives at the appropriate mailbox
from Outlook. The custom field values can be accessed from the
Appointment object like so:
appt.Fields[ "ConferencePIN" ].Value
I'm now enhancing the application so that in a certain circumstance the
sink forwards the meeting request to another mailbix. This mailbox also
has a sink attached. When the meeting request arrives, all custom fields
are missing.
To forward the meeting request I have tried many things.
From the simple (app is written in c#):
CDO.IMessage msg = calMsg.Message.Forward();
msg.From = myMboxAddress;
msg.To = newMboxAddress;
msg.Send();
to the more complex:
CDO.CalendarMessage cMsg = appt.Invite(newMboxAddress); // Also tried
CreateRequest here
plus a whole bunch of resetting the appt fields, Updating, saving to
containers etc.
cMsg.Message.Send();
It seems that just prior to the message leaving the appointment object
has the correct values but once gone, they disappear.
Anyone with any ideas?
Chris
|
|
|
| Back to top |
|
 |
Chris McKay
Guest
|
Posted:
Mon Nov 14, 2005 1:58 am Post subject:
Re: Custom Fields go missing on a Message forward |
|
|
Thanks for that Glen,
That makes perfect sense. However I'm still struggling to get the message
forwarded correctly.
I get the CalendarMessage by opening the DataSource on the bstrURL that
comes in on the sink, then I iterate the CalenderParts to get the
appointment. Then I am currently using the following code:
appt.Configuration.Fields[CDO.CdoConfiguration.cdoSendEmailAddress].Value =
myMboxAddress;
appt.Configuration.Fields[CDO.CdoConfiguration.cdoMailboxURL].Value =
bstrURLItem.Substring(0, bstrURLItem.LastIndexOf(config.ExchInboxString));
// this is the value - "file://./backofficestorage/defacto.local/MBX/chris"
appt.Configuration.Fields[CDO.CdoConfiguration.cdoSendUsingMethod].Value =
CDO.CdoSendUsing.cdoSendUsingExchange;
appt.Configuration.Fields.Update();
appt.DataSource.SaveToContainer(calendarLocation, null,
ConnectModeEnum.adModeReadWrite,
RecordCreateOptionsEnum.adCreateOverwrite,
RecordOpenOptionsEnum.adOpenSource, "", ""); // tried with and without this
....
CDO.IMessage msg = cm.Message.Forward();
msg.From = myMboxAddress;
msg.To = newMboxAddress;
msg.Send();
At the other end, the custom fields don;t show. In the mean time, I'm
shoving the custom fields in the TextBody section of the message in a truely
horrible hack that I hope never sees the light of day.
"Glen Scales [MVP]" <gscales@outlookexchange.com> wrote in message
news:OkRhnIZ5FHA.3136@TK2MSFTNGP09.phx.gbl...
| Quote: | You need to make sure that when your sending the message your sending
using Exchange (using the Exchange Mail Submission Uniform Resource
Identifier) this isn't the default for CDOEX (default is SMTP) if you use
SMTP then MAPI properties wont persist. So you need to make sure you
include a configuration object and set the
http://schemas.microsoft.com/cdo/configuration/mailboxurl and
http://schemas.microsoft.com/cdo/configuration/sendusing in your code for
a sample have a look at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_cdo_sending_a_meeting_request.asp
Cheers
Glen
"Chris McKay" <chris_mckay@hotmail.com> wrote in message
news:eD$AKFN5FHA.4012@TK2MSFTNGP14.phx.gbl...
Hi,
I have a Event Sink working on Exchange 2k3. I have a custom Outlook form
that has some additional fields within the Meeting/Appointment form.
The sink fires when a meeting request arrives at the appropriate mailbox
from Outlook. The custom field values can be accessed from the
Appointment object like so:
appt.Fields[ "ConferencePIN" ].Value
I'm now enhancing the application so that in a certain circumstance the
sink forwards the meeting request to another mailbix. This mailbox also
has a sink attached. When the meeting request arrives, all custom fields
are missing.
To forward the meeting request I have tried many things.
From the simple (app is written in c#):
CDO.IMessage msg = calMsg.Message.Forward();
msg.From = myMboxAddress;
msg.To = newMboxAddress;
msg.Send();
to the more complex:
CDO.CalendarMessage cMsg = appt.Invite(newMboxAddress); // Also tried
CreateRequest here
plus a whole bunch of resetting the appt fields, Updating, saving to
containers etc.
cMsg.Message.Send();
It seems that just prior to the message leaving the appointment object
has the correct values but once gone, they disappear.
Anyone with any ideas?
Chris
|
|
|
| Back to top |
|
 |
|
|
|
|