update xheader of received message

S

sd

hi
I've added xheader(Matter) to message using Redemption.Now On receving
end I extract
my xheader using redemption(by means of PR_TRANSPORT_MESSAGE_HEADERS)
& display the
xheader value in combobox control placed on form region adjoined to
read message.The user
can modify the text of combobox & when save command bttn on the same
form region
is pressed the modified value needs to be reflected in the xheader of
that message.
I was able to add xheader to outgoing message & at receiving end
extracted & displayed
it but not able to update the xheader with user modified value.Do I
need to modify
PR_TRANSPORT_MESSAGE_HEADERS or use the same code of addXheader i.e.
sItem = CreateObject("Redemption.SafeMailItem")
sItem.Item = MailItem
Tag = sItem.GetIDsFromNames("{00020386-0000-0000-
C000-000000000046}", Prop)
Tag = Tag Or &H1E 'the type is PT_STRING8
sItem.Fields(Tag) = Val
sItem.Subject = sItem.Subject
sItem.Save()

Thanks
 
D

Dmitry Streblechenko

If you read the value from PR_TRANSPORT_MESSAGE_HEADERS, then I assume you
would want to save into the same property.
What do you mean by "not able to update the xheader with user modified
value"?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
S

sd

I've custom xheader (say x-Matter) added to outgoing message.On
receiving end I extract the xheader ,display on control(cmbMatter)
placed on form region of read message.User can modify the value of
that control.When the user presses save bttn on tha same form
region ,I need to update the same Xheader(x-Matter) with updated
value of the control(cmbMatter) entered by user.So I need to modify
PR_TRANSPORT_MESSAGE_HEADERS & x-Matter both.
How to do this ?
Thanks!
 
D

Dmitry Streblechenko

Merge the new value of header into the old value of
PR_TRANSPORT_MESSAGE_HEADERS , then set the property using
SafeMailItem.Fields(PR_TRANSPORT_MESSAGE_HEADERS ) = newValue.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
S

sd

Thanks Dmitry!
It worked.I modified PR_TRANSPORT_MESSAGE_HEADERS.
but can I modify Specific Xheader (Here x-matter) as after modifying
PR_TRANSPORT_MESSAGE_HEADERS when I right click message & select
Message options ,it shows me old value not modified value.But when I
dump
PR_TRANSPORT_MESSAGE_HEADERS ,it shows me modified value.Why so?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top