F
Francois Miermont
Another question (I know I'm too curious). When I restore a 57MB mailboxe, it
become a 47MB mailboxe.
For exemple, I have an original mail at 13KB, then restored at 7KB. I use
OutlookSpy (great tool !) to see the difference between them, and found :
PR_CHANGE_KEY
PR_CREATION_TIME
PR_ENTRYID
PR_LAST_MODIFICATION_TIME
PR_PARENT_ENTRYID
PR_PREDECESSOR_CHANGE_LIST
PR_RECORD_KEY
PR_RTF_IN_SYNC
PR_SEARCH_KEY
For those I think it's normal but :
PR_RTF_COMPRESSED (Original mail : MAPI_E_NOT_FOUND, restored mail : a huge
value)
PR_MESSAGE_SIZE (Original : 13517, restored 6732)
So as we can see, the Size attribute is not the same, which reflect the
difference.
The PR_RTF_COMPRESSED attribute is the one which interrest me : is that mean
that Redemption can compressed mail when importing it ??
That will be the explication of the differents sizes ? I want to be sure
that I'm not loosing data when I'm backup/restore.
become a 47MB mailboxe.
For exemple, I have an original mail at 13KB, then restored at 7KB. I use
OutlookSpy (great tool !) to see the difference between them, and found :
PR_CHANGE_KEY
PR_CREATION_TIME
PR_ENTRYID
PR_LAST_MODIFICATION_TIME
PR_PARENT_ENTRYID
PR_PREDECESSOR_CHANGE_LIST
PR_RECORD_KEY
PR_RTF_IN_SYNC
PR_SEARCH_KEY
For those I think it's normal but :
PR_RTF_COMPRESSED (Original mail : MAPI_E_NOT_FOUND, restored mail : a huge
value)
PR_MESSAGE_SIZE (Original : 13517, restored 6732)
So as we can see, the Size attribute is not the same, which reflect the
difference.
The PR_RTF_COMPRESSED attribute is the one which interrest me : is that mean
that Redemption can compressed mail when importing it ??
That will be the explication of the differents sizes ? I want to be sure
that I'm not loosing data when I'm backup/restore.
Francois Miermont said:Hello Dmitry
I have tested RDOMail object, and putting the Sent propertie to true, and I
works ! Furthermore, I have incredible performance, less than one minute to
restore a 150MB mailbox !
Just a little question : the unread flag seems to not be restored despite it
is really saved. What can I do to solve this minor problem ?
Dmitry Streblechenko said:Here I am
SafeMailItem object in Redemption only exposes properties and methods
blocked by the Outlook Object Model. MessageClass is not blocked, hence
SafeMailItem does not implement it. You can either set that property on the
original Outlook object assigned to the SafeMailItem.Item property or use
RDOMail object (no Outlook objects involed) -
http://www.dimastr.com/redemption/rdo/. RDOMail object has a Sent property,
which is, unlike OOM, r/w, but you will get an error if you set it after the
message was saved at least once (just a MAPI limitation). This way you don't
even need to mess with the MessageClass - just call Import(), then set the
Sent property ot true.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
Francois Miermont said:Just try it and does not work :/
Is there a way to ask Redemption's author directly ?
:
Redemption will pass the MessageClass through to the SafeMailItem.Item,
but C# doesn't know that, and I don't do that language, so I don't know
how you're supposed to code it. You could try SafeMailItem.Save, followed
by setting SafeMailItem.Item.MessageClass and then SafeMailItem.Item.Save
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
message It seems that I don"t have this MessageClass propertie avaible in my
SafeMailItem Class ?
:
Take a look at the sample at
http://www.outlookcode.com/codedetail.aspx?id=716, which has worked
fine for me. You need to set the MessageClass to "IPM.Note" after you
perform the import.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
in message Okay I just try to use Redemption to see what I can do with it. So
I'll try
to import my msg file.
On the Redemption website, I'm unable to find a way to import a msg
file
without creating a new item in Outlook. The given code is like this
:
dim sItem, oItem
set sItem = CreateObject("Redemption.SafeMailItem")
set oItem = Application.Session.GetDefaultFolder(16).Items.Add(6)
sItem.Item = oItem
sItem.Import "c:\temp\test.msg", 3 'olMSG, olRFC822 and olTNEF
formats are
supported
sItem.Save
In fact, it the same behaviour as an ImportFromTemplate call : the
imported
mail is a new item, so I haven't the Reply button.
Or maybe I'm not doing it correctly ?
:
Sweet, this is a non-free wrapper that cost the same as Redemption.
So there is no way to import an msg file in outlook in .net expect
using
redemption ? I can't understand that !
:
Extended MAPI is not supported in .NET. You'd have to go to a
third-party wrapper there, too --
http://www.mapi33.adexsolutions.com/
"Francois Miermont" <fmiermont[at]netfinances.fr> wrote in
message
I dont have any idea of how using ExMapi with .net. If you have
any links
:
The Outlook object model provides no way to do that
programmatically. You have to go to either Extended MAPI or
Redemption.
"Francois Miermont" <fmiermont[at]netfinances.fr> wrote in
message
Sue you says that CreateItemFromTemplate is not the correct
method to import
msg file, as it not import the mail, but create a new item
from this mail.
But what can I do if I don't want to use Redemption ? In
fact, I just want to
do the same behaviour as if I drag&drop a MSG file into
Outlook.