HowTo:Get email in completely raw format?

  • Thread starter Thread starter Venketash \(Pat\) Ramadass
  • Start date Start date
V

Venketash \(Pat\) Ramadass

Hi,

I am writing an Outlook addin that needs to be able to read all parts of the
email message in its raw format, i.e. content/mime types/headers etc.
Probably as string. The result should look something similar to when you
save a message as a .eml in outlook express or when you use Outlook to look
at a message's Internet headers (Right-click on the message in outlook and
click on options), but containing all the message data.

So far the furthest I have come is using CDO and looping through the
message's fields. Although this contains what looks to be all the raw data,
none of the dividing text etc is present. I need the message in its
completely raw format.

I would have thought that this must be the simplest thing to do, so
apologies if I have missed something obvious. Any help would be appreciated
though.

Kind regards,

-Pat Ramadass
(e-mail address removed)
 
Hi again,

Thanks for the response. The addin will be something similar to how the PGP
plugin works, so having the message in its raw (RFC 822) format seemed to be
the best way to sign data and also to verify signatures (body, some headers,
MIME stuff for attachments etc).

What are your thoughts?

-Pat
(e-mail address removed)
 
RFC822 message returned by Redemption will *not* be the same as when sent by
Outlook over SMTP, even though a user won't be able to tell a difference.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Venketash \(Pat\) Ramadass said:
Hi,

I am writing an Outlook addin that needs to be able to read all parts of the
email message in its raw format, i.e. content/mime types/headers etc.
Probably as string. The result should look something similar to when you
save a message as a .eml in outlook express or when you use Outlook to look
at a message's Internet headers (Right-click on the message in outlook and
click on options), but containing all the message data.

So far the furthest I have come is using CDO and looping through the
message's fields. Although this contains what looks to be all the raw data,
none of the dividing text etc is present. I need the message in its
completely raw format.

I would have thought that this must be the simplest thing to do, so
apologies if I have missed something obvious. Any help would be appreciated
though.

Kind regards,

-Pat Ramadass
(e-mail address removed)

If you need to get the email in the raw form I would recommend rebol,
at www.rebol.com, go here for a quick overview of email with rebol:
http://www.rebol.com/docs/core23/rebolcore-13.html#section-10

what I've had occasion to do in the past, is build a pre-getter in
rebol, that gets the emails, does stuff with them, dependent on what
it did, resend the email with a specific header ignored by the
pre-getter, that has a rule in Outlook for which folder the email
should be saved to.
 
Back
Top