Xref type property in an email header?

Status
Not open for further replies.
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:<4AF43476.5030802@test.com
The reply will have something like

In-Reply-To:<4AF43476.5030802@test.com
so one knows which message this was in reference to. Also, there is a

reference number. Something like

References:<4AF43476.5030802@test.com
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:<4AF43476.5030802@test.com> <6B038E8@responder.com
The MessageID will be that person's message identifier, in this case

MessageID:<6B038E8@responder.com>.

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:<6B038E7@responder.com
We can see the id of the message it was forwarded from, not my original

MessageID of <4AF43476.5030802@test.com>.

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)

-

"Salad" <oil@vinegar.com> wrote in message

news:8aWdnffVSffFxGbXnZ2dnUVZ_j6dnZ2d@earthlink.com...
> 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:<4AF43476.5030802@test.com
> The reply will have something like
> In-Reply-To:<4AF43476.5030802@test.com
> so one knows which message this was in reference to. Also, there is a
> reference number. Something like
> References:<4AF43476.5030802@test.com
> 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:<4AF43476.5030802@test.com> <6B038E8@responder.com
> The MessageID will be that person's message identifier, in this case
> MessageID:<6B038E8@responder.com>.
> 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:<6B038E7@responder.com
> We can see the id of the message it was forwarded from, not my original
> MessageID of <4AF43476.5030802@test.com>.

> 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.

>
 
S

Salad

Dmitry Streblechenko wrote:
> 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)

-

"Salad" <oil@vinegar.com> wrote in message

news:mJ6dnZJivrPFPGDXnZ2dnUVZ_gudnZ2d@earthlink.com...
> Dmitry Streblechenko wrote:
> > 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.

>
 
S

Salad

Dmitry Streblechenko wrote:
> 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)

-

"Salad" <oil@vinegar.com> wrote in message

news:C-6dnWW3z5aMZWDXnZ2dnUVZ_gKdnZ2d@earthlink.com...
> Dmitry Streblechenko wrote:
> > 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.
>
 
S

Salad

Dmitry Streblechenko wrote:
> 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.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
P Outlook tasks keeps changing (updating) dates that I type Using Outlook 2
D Forwarding email based on the attachment file type and specific text found on the attachment file name Outlook VBA and Custom Forms 1
H Search Email Header for Content Type Outlook VBA and Custom Forms 1
E Having some trouble with a run-a-script rule (moving mail based on file type) Outlook VBA and Custom Forms 5
M Compile error: User-defined type not defined Outlook VBA and Custom Forms 0
P Encryption Type Error - Verizon and Outlook 2010 Using Outlook 0
C im getting a type mismatch error Outlook VBA and Custom Forms 3
D Calendar appointment, type 2 Using Outlook 2
T issue changing [Type] in dbo.ContactMainTable/ contacts seem to be deleted BCM (Business Contact Manager) 5
Diane Poremsky Fix the Outlook Folder Type after Exporting an IMAP Account Using Outlook 0
T How to remove annoying Big Blue Type at beginning of my messages Using Outlook 2
L Font Type and Space Using Outlook 7
B Outlook 11 for Mac - Imap or Pop Account Type Using Outlook 6
F Change default value of date/time type from "None" to Blank Using Outlook 1
Rupert Dragwater Can't save font type in Outlook 2010 Using Outlook 3
F "MSG" type attachments are stripped away when senand previewed with HTML tags. Using Outlook 3
B [SOLVED] Forced to type Domain/username for OWA 2003 with IE 7 or 8 Exchange Server Administration 3
V Type a contact to find NOT WORKING properly? Using Outlook 2
B Outlook contacts with Hotmail. - Error >>>The text exceeds the limit of 1024 characters. Type a shor Using Outlook 4
T Get rid of having to type verification characters to send mail BCM (Business Contact Manager) 2
A Help creating custom Contacts form - what type is 'Email' control? Outlook VBA and Custom Forms 1
J instructions disppear when users begin type (text field) Outlook VBA and Custom Forms 1
S Adding a mail address/recipient type field to a form Outlook VBA and Custom Forms 1
P Problem in temporary type toolbar Outlook VBA and Custom Forms 1
P Problem in permanent type add-in toolbar Outlook VBA and Custom Forms 6
R Add new type and Custom form on exchange Outlook VBA and Custom Forms 3
T Setting a MAPI property of type PT_SYSTIME Outlook VBA and Custom Forms 4
C Unable to cast object of type 'System.Int32' to type 'System.Byte[ BCM (Business Contact Manager) 1
M Outlook 2007 "Connection Status..." shows 3 "Disconnected" entries of type "Directory" Using Outlook 18
B Change data in an Internal Data Type Outlook VBA and Custom Forms 6
C How to create a custom 'View Type' Outlook VBA and Custom Forms 7
D Outlook 2007 AddIn: Filter attachments by type Outlook VBA and Custom Forms 2
K Re: Alert message every hour based on type/number of mail messages Outlook VBA and Custom Forms 3
S Visual indicator of a certain property or to show a macro toggle Outlook VBA and Custom Forms 2
D Outlook VBA error extracting property data from GetRules collection Outlook VBA and Custom Forms 10
G Store.FilePath Property Outlook VBA and Custom Forms 4
W Appointment occurrences change the location property Using Outlook 0
oliv- property "is printed" or catching print events Outlook VBA and Custom Forms 2
B Assistance with Deprecated .Links Property Outlook VBA and Custom Forms 2
JorgeDario ¿What property of mailitem can be used like primary key? Outlook VBA and Custom Forms 6
M Accessing ExpiryTime property Outlook VBA and Custom Forms 1
M How to automatically refresh an appointment windows after changing the MessageClass property ? Outlook VBA and Custom Forms 4
R Vba Conversation Index property Using Outlook 0
H Calendar Folder property is empty Using Outlook 1
G run-time 438: object doesn't support this property or method Using Outlook 2
Commodore Calendar Folder property is missing - Event 27 Using Outlook 11
B Update Item.Subject property Using Outlook 1
S Custom property/functionality not stored when I publish to a Public Folder Using Outlook 7
T You must Provide a value for this property on powershell cmdlet Exchange Server Administration 3
S Saved Property of MailItem is copied Outlook VBA and Custom Forms 1

Similar threads

Top