 |
|
|
|
| Author |
Message |
Shreenath Laxman
Joined: 05 Aug 2007 Posts: 3
|
Posted: Fri May 21, 2004 3:24 pm Post subject: Move messages between mailboxes |
|
|
Hi,
I need to write a service that works against a mailbox, moving all
messages from there into different mailboxes based on the sender. Can
somebody give me some pointers or point me to some code
examples/articles on how this can be done? I tried using CDO and
VBScript, but found that MoveTo, CopyTo and such methods cant be used
across mailboxes. I guess I would have to use C++ and extended mapi
then? I am not very familiar with C++ and it would be great if someone
could point me in the right direction. I am working with Exchange
2003.
Thanks.
Shree.
Archived from group: microsoft>public>exchange>development |
|
| Back to top |
|
 |
Glen Scales [MVP]
Joined: 05 Aug 2007 Posts: 92
|
Posted: Mon May 24, 2004 3:21 pm Post subject: Re: Move messages between mailboxes |
|
|
If all the mailboxes are located in the same mailbox store then
If you run your application locally on the server you could use Exoledb and
use moverecord to move the objects between mailboxes
If you want to do it remotely you could use WEBDAV Move to move items
between mailboxes.
In both cases you should look at some code that generates unique URI's to
make sure you don't keep overwriting the same item.
If the mailboxes exist in different stores and or different servers then you
can't use either of these methods you could try using the stream to save and
then create the item on the other store (haven't ever tried this method
myself).
These are alternate methods to using extended MAPI that you can use in VB
for more info get a hold of the latest copy of the Exchange SDK from MSDN.
Cheers
Glen
"Shreenath Laxman" wrote in message@posting.google.com...
> Hi,
> I need to write a service that works against a mailbox, moving all
> messages from there into different mailboxes based on the sender. Can
> somebody give me some pointers or point me to some code
> examples/articles on how this can be done? I tried using CDO and
> VBScript, but found that MoveTo, CopyTo and such methods cant be used
> across mailboxes. I guess I would have to use C++ and extended mapi
> then? I am not very familiar with C++ and it would be great if someone
> could point me in the right direction. I am working with Exchange
> 2003.
> Thanks.
> Shree. |
|
| Back to top |
|
 |
Shreenath Laxman
Joined: 05 Aug 2007 Posts: 3
|
Posted: Tue May 25, 2004 12:53 pm Post subject: Re: Move messages between mailboxes |
|
|
I thought you could use moverecord and copyrecord only to move items
within a single mailbox. Can I use it to move items between different
mailboxes? I get an error if I try doing it. Here is the code I tried.
' Open the connection object.
Set Conn = CreateObject("ADODB.Connection")
Conn.Provider = "ExOLEDB.DataSource"
UrlFrom="file://./backofficestorage/mydomain.corp/MBX/mailbox1/inbox/test.eml"
Conn.Open UrlFrom
' Open the record object.
Set Rec = CreateObject("ADODB.Record")
Rec.Open URLFrom, Conn,3
' Move the item. Note that if an item
' already exists at the destination URI,
' it will be overwritten by the move.
NewURL = Rec.MoveRecord( ,
"file://./backofficestorage/mydomain.corp/MBX/mailbox2/inbox/test123.eml",
, ,1)
' Clean up.
Rec.Close
Conn.Close
MoveItem = NewURL
It throws an error at the MoveRecord line saying the source URL or
parent of destination URL does not exist.
I also tried to do the same with WebDav, but get a 502 Bad Gateway
error. Both codes work fine if the source and destination mailbox are
the same.
"Glen Scales [MVP]" wrote in message news:...
> If all the mailboxes are located in the same mailbox store then
>
> If you run your application locally on the server you could use Exoledb and
> use moverecord to move the objects between mailboxes
>
> If you want to do it remotely you could use WEBDAV Move to move items
> between mailboxes.
>
> In both cases you should look at some code that generates unique URI's to
> make sure you don't keep overwriting the same item.
>
> If the mailboxes exist in different stores and or different servers then you
> can't use either of these methods you could try using the stream to save and
> then create the item on the other store (haven't ever tried this method
> myself).
>
> These are alternate methods to using extended MAPI that you can use in VB
> for more info get a hold of the latest copy of the Exchange SDK from MSDN.
>
> Cheers
> Glen
>
>
>
>
> "Shreenath Laxman" wrote in message
> @posting.google.com...
> > Hi,
> > I need to write a service that works against a mailbox, moving all
> > messages from there into different mailboxes based on the sender. Can
> > somebody give me some pointers or point me to some code
> > examples/articles on how this can be done? I tried using CDO and
> > VBScript, but found that MoveTo, CopyTo and such methods cant be used
> > across mailboxes. I guess I would have to use C++ and extended mapi
> > then? I am not very familiar with C++ and it would be great if someone
> > could point me in the right direction. I am working with Exchange
> > 2003.
> > Thanks.
> > Shree. |
|
| Back to top |
|
 |
Glen Scales [MVP]
Joined: 05 Aug 2007 Posts: 92
|
Posted: Wed May 26, 2004 4:10 pm Post subject: Re: Move messages between mailboxes |
|
|
Yes sorry your right i was thinking about public folders which are really
just one big mailbox (Doh!)
In this case the only method other then Extended Mapi (which im not sure
about) would be to use the stream object something like this should work the
only problem you may find is that you will lose any Rich Text Formatting on
the message because the stream object doesn't contain this info.
Const adDefaultStream = -1
set rec = createobject("ADODB.Record")
set stm = CreateObject("ADODB.Stream")
set msgobj = createobject("CDO.Message")
rec.open
"file://./backofficestorage/yourdomain.com/MBX/Source/inbox/testsource.eml",
,3
set stm = Rec.Fields(adDefaultStream).Value
msgobj.datasource.openobject stm, "_Stream"
msgobj.datasource.saveto
"file://./backofficestorage/yourdomain.com/MBX/target/inbox/testtarget.eml"
Cheers
Glen
"Shreenath Laxman" wrote in message@posting.google.com...
> I thought you could use moverecord and copyrecord only to move items
> within a single mailbox. Can I use it to move items between different
> mailboxes? I get an error if I try doing it. Here is the code I tried.
> ' Open the connection object.
> Set Conn = CreateObject("ADODB.Connection")
> Conn.Provider = "ExOLEDB.DataSource"
>
UrlFrom="file://./backofficestorage/mydomain.corp/MBX/mailbox1/inbox/test.em
l"
> Conn.Open UrlFrom
>
> ' Open the record object.
> Set Rec = CreateObject("ADODB.Record")
> Rec.Open URLFrom, Conn,3
>
> ' Move the item. Note that if an item
> ' already exists at the destination URI,
> ' it will be overwritten by the move.
> NewURL = Rec.MoveRecord( ,
> "file://./backofficestorage/mydomain.corp/MBX/mailbox2/inbox/test123.eml",
> , ,1)
>
> ' Clean up.
> Rec.Close
> Conn.Close
>
> MoveItem = NewURL
>
>
> It throws an error at the MoveRecord line saying the source URL or
> parent of destination URL does not exist.
> I also tried to do the same with WebDav, but get a 502 Bad Gateway
> error. Both codes work fine if the source and destination mailbox are
> the same.
>
> "Glen Scales [MVP]" wrote in message
news:...
> > If all the mailboxes are located in the same mailbox store then
> >
> > If you run your application locally on the server you could use Exoledb
and
> > use moverecord to move the objects between mailboxes
> >
> > If you want to do it remotely you could use WEBDAV Move to move items
> > between mailboxes.
> >
> > In both cases you should look at some code that generates unique URI's
to
> > make sure you don't keep overwriting the same item.
> >
> > If the mailboxes exist in different stores and or different servers then
you
> > can't use either of these methods you could try using the stream to save
and
> > then create the item on the other store (haven't ever tried this method
> > myself).
> >
> > These are alternate methods to using extended MAPI that you can use in
VB
> > for more info get a hold of the latest copy of the Exchange SDK from
MSDN.
> >
> > Cheers
> > Glen
> >
> >
> >
> >
> > "Shreenath Laxman" wrote in message
> > @posting.google.com...
> > > Hi,
> > > I need to write a service that works against a mailbox, moving all
> > > messages from there into different mailboxes based on the sender. Can
> > > somebody give me some pointers or point me to some code
> > > examples/articles on how this can be done? I tried using CDO and
> > > VBScript, but found that MoveTo, CopyTo and such methods cant be used
> > > across mailboxes. I guess I would have to use C++ and extended mapi
> > > then? I am not very familiar with C++ and it would be great if someone
> > > could point me in the right direction. I am working with Exchange
> > > 2003.
> > > Thanks.
> > > Shree. |
|
| Back to top |
|
 |
Shreenath Laxman
Joined: 05 Aug 2007 Posts: 3
|
Posted: Wed May 26, 2004 2:03 pm Post subject: Re: Move messages between mailboxes |
|
|
Can you (or someone else) also give me some pointers on how to achieve
the same using Extended MAPI? Any links to sample code would be great.
thanks.
Shree
"Glen Scales [MVP]" wrote in message news:...
> Yes sorry your right i was thinking about public folders which are really
> just one big mailbox (Doh!)
>
> In this case the only method other then Extended Mapi (which im not sure
> about) would be to use the stream object something like this should work the
> only problem you may find is that you will lose any Rich Text Formatting on
> the message because the stream object doesn't contain this info.
>
> Const adDefaultStream = -1
> set rec = createobject("ADODB.Record")
> set stm = CreateObject("ADODB.Stream")
> set msgobj = createobject("CDO.Message")
> rec.open
> "file://./backofficestorage/yourdomain.com/MBX/Source/inbox/testsource.eml",
> ,3
> set stm = Rec.Fields(adDefaultStream).Value
> msgobj.datasource.openobject stm, "_Stream"
> msgobj.datasource.saveto
> "file://./backofficestorage/yourdomain.com/MBX/target/inbox/testtarget.eml"
>
>
> Cheers
> Glen
>
> "Shreenath Laxman" wrote in message
> @posting.google.com...
> > I thought you could use moverecord and copyrecord only to move items
> > within a single mailbox. Can I use it to move items between different
> > mailboxes? I get an error if I try doing it. Here is the code I tried.
> > ' Open the connection object.
> > Set Conn = CreateObject("ADODB.Connection")
> > Conn.Provider = "ExOLEDB.DataSource"
> >
> UrlFrom="file://./backofficestorage/mydomain.corp/MBX/mailbox1/inbox/test.em
> l"
> > Conn.Open UrlFrom
> >
> > ' Open the record object.
> > Set Rec = CreateObject("ADODB.Record")
> > Rec.Open URLFrom, Conn,3
> >
> > ' Move the item. Note that if an item
> > ' already exists at the destination URI,
> > ' it will be overwritten by the move.
> > NewURL = Rec.MoveRecord( ,
> > "file://./backofficestorage/mydomain.corp/MBX/mailbox2/inbox/test123.eml",
> > , ,1)
> >
> > ' Clean up.
> > Rec.Close
> > Conn.Close
> >
> > MoveItem = NewURL
> >
> >
> > It throws an error at the MoveRecord line saying the source URL or
> > parent of destination URL does not exist.
> > I also tried to do the same with WebDav, but get a 502 Bad Gateway
> > error. Both codes work fine if the source and destination mailbox are
> > the same.
> >
> > "Glen Scales [MVP]" wrote in message
> news:...
> > > If all the mailboxes are located in the same mailbox store then
> > >
> > > If you run your application locally on the server you could use Exoledb
> and
> > > use moverecord to move the objects between mailboxes
> > >
> > > If you want to do it remotely you could use WEBDAV Move to move items
> > > between mailboxes.
> > >
> > > In both cases you should look at some code that generates unique URI's
> to
> > > make sure you don't keep overwriting the same item.
> > >
> > > If the mailboxes exist in different stores and or different servers then
> you
> > > can't use either of these methods you could try using the stream to save
> and
> > > then create the item on the other store (haven't ever tried this method
> > > myself).
> > >
> > > These are alternate methods to using extended MAPI that you can use in
> VB
> > > for more info get a hold of the latest copy of the Exchange SDK from
> MSDN.
> > >
> > > Cheers
> > > Glen
> > >
> > >
> > >
> > >
> > > "Shreenath Laxman" wrote in message
> > > @posting.google.com...
> > > > Hi,
> > > > I need to write a service that works against a mailbox, moving all
> > > > messages from there into different mailboxes based on the sender. Can
> > > > somebody give me some pointers or point me to some code
> > > > examples/articles on how this can be done? I tried using CDO and
> > > > VBScript, but found that MoveTo, CopyTo and such methods cant be used
> > > > across mailboxes. I guess I would have to use C++ and extended mapi
> > > > then? I am not very familiar with C++ and it would be great if someone
> > > > could point me in the right direction. I am working with Exchange
> > > > 2003.
> > > > Thanks.
> > > > Shree. |
|
| Back to top |
|
 |
Luis Castro
Joined: 06 Aug 2007 Posts: 1
|
Posted: Wed May 26, 2004 8:26 pm Post subject: Re: Move messages between mailboxes |
|
|
| You can try using Exoledb and manualy creating the message en the other mailbox and copy all the properties and text. |
|
| Back to top |
|
 |
Paul Garner
Joined: 06 Aug 2007 Posts: 1
|
Posted: Tue Jun 15, 2004 4:56 pm Post subject: Re: Move messages between mailboxes |
|
|
Glen,
Is there no way to move or copy messages between mailboxes without losing rich text formatting?
"Glen Scales [MVP]" wrote:
> Yes sorry your right i was thinking about public folders which are really
> just one big mailbox (Doh!)
>
> In this case the only method other then Extended Mapi (which im not sure
> about) would be to use the stream object something like this should work the
> only problem you may find is that you will lose any Rich Text Formatting on
> the message because the stream object doesn't contain this info.
>
> Const adDefaultStream = -1
> set rec = createobject("ADODB.Record")
> set stm = CreateObject("ADODB.Stream")
> set msgobj = createobject("CDO.Message")
> rec.open
> "file://./backofficestorage/yourdomain.com/MBX/Source/inbox/testsource.eml",
> ,3
> set stm = Rec.Fields(adDefaultStream).Value
> msgobj.datasource.openobject stm, "_Stream"
> msgobj.datasource.saveto
> "file://./backofficestorage/yourdomain.com/MBX/target/inbox/testtarget.eml"
>
>
> Cheers
> Glen
>
> "Shreenath Laxman" wrote in message
> @posting.google.com...
> > I thought you could use moverecord and copyrecord only to move items
> > within a single mailbox. Can I use it to move items between different
> > mailboxes? I get an error if I try doing it. Here is the code I tried.
> > ' Open the connection object.
> > Set Conn = CreateObject("ADODB.Connection")
> > Conn.Provider = "ExOLEDB.DataSource"
> >
> UrlFrom="file://./backofficestorage/mydomain.corp/MBX/mailbox1/inbox/test.em
> l"
> > Conn.Open UrlFrom
> >
> > ' Open the record object.
> > Set Rec = CreateObject("ADODB.Record")
> > Rec.Open URLFrom, Conn,3
> >
> > ' Move the item. Note that if an item
> > ' already exists at the destination URI,
> > ' it will be overwritten by the move.
> > NewURL = Rec.MoveRecord( ,
> > "file://./backofficestorage/mydomain.corp/MBX/mailbox2/inbox/test123.eml",
> > , ,1)
> >
> > ' Clean up.
> > Rec.Close
> > Conn.Close
> >
> > MoveItem = NewURL
> >
> >
> > It throws an error at the MoveRecord line saying the source URL or
> > parent of destination URL does not exist.
> > I also tried to do the same with WebDav, but get a 502 Bad Gateway
> > error. Both codes work fine if the source and destination mailbox are
> > the same.
> >
> > "Glen Scales [MVP]" wrote in message
> news:...
> > > If all the mailboxes are located in the same mailbox store then
> > >
> > > If you run your application locally on the server you could use Exoledb
> and
> > > use moverecord to move the objects between mailboxes
> > >
> > > If you want to do it remotely you could use WEBDAV Move to move items
> > > between mailboxes.
> > >
> > > In both cases you should look at some code that generates unique URI's
> to
> > > make sure you don't keep overwriting the same item.
> > >
> > > If the mailboxes exist in different stores and or different servers then
> you
> > > can't use either of these methods you could try using the stream to save
> and
> > > then create the item on the other store (haven't ever tried this method
> > > myself).
> > >
> > > These are alternate methods to using extended MAPI that you can use in
> VB
> > > for more info get a hold of the latest copy of the Exchange SDK from
> MSDN.
> > >
> > > Cheers
> > > Glen
> > >
> > >
> > >
> > >
> > > "Shreenath Laxman" wrote in message
> > > @posting.google.com...
> > > > Hi,
> > > > I need to write a service that works against a mailbox, moving all
> > > > messages from there into different mailboxes based on the sender. Can
> > > > somebody give me some pointers or point me to some code
> > > > examples/articles on how this can be done? I tried using CDO and
> > > > VBScript, but found that MoveTo, CopyTo and such methods cant be used
> > > > across mailboxes. I guess I would have to use C++ and extended mapi
> > > > then? I am not very familiar with C++ and it would be great if someone
> > > > could point me in the right direction. I am working with Exchange
> > > > 2003.
> > > > Thanks.
> > > > Shree.
>
>
> |
|
| Back to top |
|
 |
Paul Garner
Joined: 06 Aug 2007 Posts: 1
|
Posted: Tue Jun 15, 2004 4:58 pm Post subject: Re: Move messages between mailboxes |
|
|
Glen,
Is there no way to move or copy messages between mailboxes with out losing the rich text formatting?
"Glen Scales [MVP]" wrote:
> Yes sorry your right i was thinking about public folders which are really
> just one big mailbox (Doh!)
>
> In this case the only method other then Extended Mapi (which im not sure
> about) would be to use the stream object something like this should work the
> only problem you may find is that you will lose any Rich Text Formatting on
> the message because the stream object doesn't contain this info.
>
> Const adDefaultStream = -1
> set rec = createobject("ADODB.Record")
> set stm = CreateObject("ADODB.Stream")
> set msgobj = createobject("CDO.Message")
> rec.open
> "file://./backofficestorage/yourdomain.com/MBX/Source/inbox/testsource.eml",
> ,3
> set stm = Rec.Fields(adDefaultStream).Value
> msgobj.datasource.openobject stm, "_Stream"
> msgobj.datasource.saveto
> "file://./backofficestorage/yourdomain.com/MBX/target/inbox/testtarget.eml"
>
>
> Cheers
> Glen
>
> "Shreenath Laxman" wrote in message
> @posting.google.com...
> > I thought you could use moverecord and copyrecord only to move items
> > within a single mailbox. Can I use it to move items between different
> > mailboxes? I get an error if I try doing it. Here is the code I tried.
> > ' Open the connection object.
> > Set Conn = CreateObject("ADODB.Connection")
> > Conn.Provider = "ExOLEDB.DataSource"
> >
> UrlFrom="file://./backofficestorage/mydomain.corp/MBX/mailbox1/inbox/test.em
> l"
> > Conn.Open UrlFrom
> >
> > ' Open the record object.
> > Set Rec = CreateObject("ADODB.Record")
> > Rec.Open URLFrom, Conn,3
> >
> > ' Move the item. Note that if an item
> > ' already exists at the destination URI,
> > ' it will be overwritten by the move.
> > NewURL = Rec.MoveRecord( ,
> > "file://./backofficestorage/mydomain.corp/MBX/mailbox2/inbox/test123.eml",
> > , ,1)
> >
> > ' Clean up.
> > Rec.Close
> > Conn.Close
> >
> > MoveItem = NewURL
> >
> >
> > It throws an error at the MoveRecord line saying the source URL or
> > parent of destination URL does not exist.
> > I also tried to do the same with WebDav, but get a 502 Bad Gateway
> > error. Both codes work fine if the source and destination mailbox are
> > the same.
> >
> > "Glen Scales [MVP]" wrote in message
> news:...
> > > If all the mailboxes are located in the same mailbox store then
> > >
> > > If you run your application locally on the server you could use Exoledb
> and
> > > use moverecord to move the objects between mailboxes
> > >
> > > If you want to do it remotely you could use WEBDAV Move to move items
> > > between mailboxes.
> > >
> > > In both cases you should look at some code that generates unique URI's
> to
> > > make sure you don't keep overwriting the same item.
> > >
> > > If the mailboxes exist in different stores and or different servers then
> you
> > > can't use either of these methods you could try using the stream to save
> and
> > > then create the item on the other store (haven't ever tried this method
> > > myself).
> > >
> > > These are alternate methods to using extended MAPI that you can use in
> VB
> > > for more info get a hold of the latest copy of the Exchange SDK from
> MSDN.
> > >
> > > Cheers
> > > Glen
> > >
> > >
> > >
> > >
> > > "Shreenath Laxman" wrote in message
> > > @posting.google.com...
> > > > Hi,
> > > > I need to write a service that works against a mailbox, moving all
> > > > messages from there into different mailboxes based on the sender. Can
> > > > somebody give me some pointers or point me to some code
> > > > examples/articles on how this can be done? I tried using CDO and
> > > > VBScript, but found that MoveTo, CopyTo and such methods cant be used
> > > > across mailboxes. I guess I would have to use C++ and extended mapi
> > > > then? I am not very familiar with C++ and it would be great if someone
> > > > could point me in the right direction. I am working with Exchange
> > > > 2003.
> > > > Thanks.
> > > > Shree.
>
>
> |
|
| Back to top |
|
 |
Glen Scales [MVP]
Joined: 05 Aug 2007 Posts: 92
|
Posted: Wed Jun 16, 2004 12:33 pm Post subject: Re: Move messages between mailboxes |
|
|
Yep there sure is i only worked this one out a couple of weeks ago,
I found the MAPI property PR_RTF_COMPRESSED which contains the RTF version
of the message text. You can use this property in the field object of a
message by using its Hex value which looks like
http://schemas.microsoft.com/mapi/proptag/x10090102. So combining this with
the following script, i use it to copy messages from a mailbox into a public
folder and retain the RTF formatting
Cheers
Glen
set msgobj = createobject("CDO.Message")
set msgobj1 = createobject("CDO.Message")
set stm = CreateObject("ADODB.Stream")
msgobj.datasource.open
"file://./backofficestorage/yourdomain.com/MBX/yourmailbox/inbox/email.eml",
,3
set stm = msgobj.getstream()
msgobj1.datasource.openobject stm, "_Stream"
rtfbody =
msgobj.fields("http://schemas.microsoft.com/mapi/proptag/x10090102")
msgobj1.fields("http://schemas.microsoft.com/mapi/proptag/x10090102") =
rtfbody
msgobj1.fields("http://schemas.microsoft.com/exchange/outlookmessageclass")
="IPM.NOTE"
msgobj1.fields.update
msgobj1.datasource.savetocontainer
"file://./backofficestorage/yourdomain.com/public folders/test/"
"Paul Garner" wrote in message@microsoft.com...
> Glen,
>
> Is there no way to move or copy messages between mailboxes with out losing
the rich text formatting?
>
> "Glen Scales [MVP]" wrote:
>
> > Yes sorry your right i was thinking about public folders which are
really
> > just one big mailbox (Doh!)
> >
> > In this case the only method other then Extended Mapi (which im not sure
> > about) would be to use the stream object something like this should work
the
> > only problem you may find is that you will lose any Rich Text Formatting
on
> > the message because the stream object doesn't contain this info.
> >
> > Const adDefaultStream = -1
> > set rec = createobject("ADODB.Record")
> > set stm = CreateObject("ADODB.Stream")
> > set msgobj = createobject("CDO.Message")
> > rec.open
> >
"file://./backofficestorage/yourdomain.com/MBX/Source/inbox/testsource.eml",
> > ,3
> > set stm = Rec.Fields(adDefaultStream).Value
> > msgobj.datasource.openobject stm, "_Stream"
> > msgobj.datasource.saveto
> >
"file://./backofficestorage/yourdomain.com/MBX/target/inbox/testtarget.eml"
> >
> >
> > Cheers
> > Glen
> >
> > "Shreenath Laxman" wrote in message
> > @posting.google.com...
> > > I thought you could use moverecord and copyrecord only to move items
> > > within a single mailbox. Can I use it to move items between different
> > > mailboxes? I get an error if I try doing it. Here is the code I tried.
> > > ' Open the connection object.
> > > Set Conn = CreateObject("ADODB.Connection")
> > > Conn.Provider = "ExOLEDB.DataSource"
> > >
> >
UrlFrom="file://./backofficestorage/mydomain.corp/MBX/mailbox1/inbox/test.em
> > l"
> > > Conn.Open UrlFrom
> > >
> > > ' Open the record object.
> > > Set Rec = CreateObject("ADODB.Record")
> > > Rec.Open URLFrom, Conn,3
> > >
> > > ' Move the item. Note that if an item
> > > ' already exists at the destination URI,
> > > ' it will be overwritten by the move.
> > > NewURL = Rec.MoveRecord( ,
> > >
"file://./backofficestorage/mydomain.corp/MBX/mailbox2/inbox/test123.eml",
> > > , ,1)
> > >
> > > ' Clean up.
> > > Rec.Close
> > > Conn.Close
> > >
> > > MoveItem = NewURL
> > >
> > >
> > > It throws an error at the MoveRecord line saying the source URL or
> > > parent of destination URL does not exist.
> > > I also tried to do the same with WebDav, but get a 502 Bad Gateway
> > > error. Both codes work fine if the source and destination mailbox are
> > > the same.
> > >
> > > "Glen Scales [MVP]" wrote in message
> > news:...
> > > > If all the mailboxes are located in the same mailbox store then
> > > >
> > > > If you run your application locally on the server you could use
Exoledb
> > and
> > > > use moverecord to move the objects between mailboxes
> > > >
> > > > If you want to do it remotely you could use WEBDAV Move to move
items
> > > > between mailboxes.
> > > >
> > > > In both cases you should look at some code that generates unique
URI's
> > to
> > > > make sure you don't keep overwriting the same item.
> > > >
> > > > If the mailboxes exist in different stores and or different servers
then
> > you
> > > > can't use either of these methods you could try using the stream to
save
> > and
> > > > then create the item on the other store (haven't ever tried this
method
> > > > myself).
> > > >
> > > > These are alternate methods to using extended MAPI that you can use
in
> > VB
> > > > for more info get a hold of the latest copy of the Exchange SDK from
> > MSDN.
> > > >
> > > > Cheers
> > > > Glen
> > > >
> > > >
> > > >
> > > >
> > > > "Shreenath Laxman" wrote in message
> > > > @posting.google.com...
> > > > > Hi,
> > > > > I need to write a service that works against a mailbox, moving all
> > > > > messages from there into different mailboxes based on the sender.
Can
> > > > > somebody give me some pointers or point me to some code
> > > > > examples/articles on how this can be done? I tried using CDO and
> > > > > VBScript, but found that MoveTo, CopyTo and such methods cant be
used
> > > > > across mailboxes. I guess I would have to use C++ and extended
mapi
> > > > > then? I am not very familiar with C++ and it would be great if
someone
> > > > > could point me in the right direction. I am working with Exchange
> > > > > 2003.
> > > > > Thanks.
> > > > > Shree.
> >
> >
> >
|
|
| Back to top |
|
 |
|
|
| Related Topics: | Paging messages Hi, Is it possible to send paging messages & SMS text from MS Exchange?... What applications will enable this? Thanks all...
Extract Attachement from messages Hi, Does someone knows how to automatically extract attachement from inbox messages (ie. a task executed when a message arrives) ? Thx -- ~°~ ~°~
OWA displaying all messages as unread Hi all, For some reason our OWA (exchange 5.5) is displaying all messages in the users Inbox and other folders as Unread. And when you do read a message using OWA it doesn't change the status to read. Also, using IE 6 on an xp box I can reply to message
How to delete received and sent messages in Exchange For those who have installed and use Microsoft Exchange, could you please help me with the following issue: I need to know how I can physically delete (which files and/or folders from the hard drive) the received and sent e-mail messages on a Windows 2000
Can't reply to or foward messages in OWA for some users We have an issue with Outlook Web Access for Exchange 5.5. Certain users aren't able to reply to or foward messages; they can view them without a problem. My account (in the group) doesn't have the problem. I have been able to reproduce |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|