Xref type property in an email header?

S

Salad

When I post this message, in the header it will contain an Xref number.
It contains the newsgroup and an identifier number
microsoft.public.outlook.program_vba:69193.

Some background info first. Looking at a header in a personal e-mail
(not Usenet) there is no Xref but it would be nice. For example, let's
say I had Customer Joe Blow and the ID for the customer record was 123,
if there were an Xref I could write to prior to sending, it might look
like Customer:123. If I could read the header, I'd know that the the
document was associated with the Customer table for Customer 123. Or
MyDatabaseAppBE:Customer:123 and it would know the database to update
would be MyDatabaseAppBE for Customer 123.

I could, of course, put something in the subject or body like C123 and a
program could parse it out so it knows it is associated with Customer
123. The downside of course is that the person responding could remove
that identifier by changing the subject line or snipping the body.

When I send a personal email, in the message header there is a MessageID
value. Something like
MessageID:<[email protected]>
The reply will have something like
In-Reply-To:<[email protected]>
so one knows which message this was in reference to. Also, there is a
reference number. Something like
References:<[email protected]>

Now if the original message was forwarded to somebody else and then the
person that received the forwarded the message to you, the References
value would contain both my MessageID and the MessageID of the person
that forwarded the message and might look like
References:<[email protected]> <[email protected]>
The MessageID will be that person's message identifier, in this case
MessageID:<[email protected]>.
The In-Reply-To would contain the person's message ID that forwarded the
message and in this example it might be something like
In-Reply-To:<[email protected]>
We can see the id of the message it was forwarded from, not my original
MessageID of <[email protected]>.

My questions. Can I write a value to a message header prior to sending
the email?

If not, when I send a message using Outlook, how can I read/determine
the MessageID when it is sent? Typically I would be sending the email
from another application using VBA...in this case Access. So when I do
a .Send, I would need to read/determine the MessageID of the message and
then I could store that to a table. I could also do my own record
association.

Last question. How can I read the message header to parse/determine the
In-Reply-To and/or References lines?

Thanks for any help.
 
D

Dmitry Streblechenko

You can read existing headers from the PR_TRANSPORT_MESSAGE_HEADERS
proeprty, accessible through MAPI/CDO 1.21/Redemption or PropertyAccessor in
OUtlook 2007.
If you need to ste a custom property on an outgoing message, you will need
to set a special named property - see
http://www.dimastr.com/redemption/faq.htm#14

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

Salad

Dmitry said:
You can read existing headers from the PR_TRANSPORT_MESSAGE_HEADERS
proeprty, accessible through MAPI/CDO 1.21/Redemption or PropertyAccessor in
OUtlook 2007.
If you need to ste a custom property on an outgoing message, you will need
to set a special named property - see
http://www.dimastr.com/redemption/faq.htm#14
Thanks much for your reply.

I was getting my info for my post from my machine at home on a Pop-3
account using O2003 using an email program other than Outlook. I then
looked at my account at work, using O2007, and checked the headers of my
Sent box. There were none. Same with my Outlook 2003 sent items. So
that seemed to shoot my concept down.

Do you know if PR_TRANSPORT_MESSAGE_HEADERS works with sent messages?
If one can't get some "link" value to use in comparing sent to received
messages, the ability to tie the two messages together would not be
there...near as I can make out.
 
D

Dmitry Streblechenko

No, PR_TRANSPORT_MESSAGE_HEADERS is only present on the mesgaes received
form an SMTP server.
I am not sure what did not work for you: are you trying to set a header on
an outgoing message?

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

Salad

Dmitry said:
No, PR_TRANSPORT_MESSAGE_HEADERS is only present on the mesgaes received
form an SMTP server.
I am not sure what did not work for you: are you trying to set a header on
an outgoing message?

No. But I can't see/view an internet header on an outgoing message. I
click on the message, right click on it, select Options, and a dialog
box with the caption Message Options is presented. At the botton it has
a text box with the caption "Internet Headers" but it's blank. This
is the same in both O2003 and O2007. My O2003 goes thru a POP-3
account, the O2007 thru an Exchange server.

I was hoping I could get a link from an outgoing to an incoming message
where a link between the two apparent.

In my original post I mentioned one could but some sort of keyword in
the subject or body or both but the person could remove that info in a
response. I figured a header would be safe area to link the two messages.

Years ago I heard mail order companies, when hardcopy was used, would
put something like Dept 123 or J Smith on the envelope to identify a
mailing. I figured a header would be a viable way of doing so as well.
 
D

Dmitry Streblechenko

As I mentioned bore, the header is only present on the incoming messages, it
will nto be present on the mesages in your Sent Items folder.

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

Salad

Dmitry said:
As I mentioned bore, the header is only present on the incoming messages, it
will nto be present on the mesages in your Sent Items folder.
Thanks for the update. My concept of using headers and linking 2
messages together is removed. I guess the best method is then to put
some sort of key in the body and/or subject and hope the responder
doesn't wipe it out.
 

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