By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,012 Members | 988 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,012 IT Pros & Developers. It's quick & easy.

exchange 2003 create draft using webDAV

P: n/a
Hi,

I'm using C# + webDAV to create a draft message to be sent in a user's
Drafts folder.

I can create the message successfully, however when I open the message
in outlook, it doesn't show the 'send' button, (only 'reply' etc as if
it was a received message).

I'm using exchange explorer to see the difference in webDAV properties
with drafts created normally from Outlook, but can't figure out which
property is responsible for showing the 'send' button.

Any hints would be appreciated.

Thanks,

Wiebe Tijsma
Apr 5 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Hello,

have you set the message class correctly?

Best regards,
Henning Krause

"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
news:el**************@TK2MSFTNGP03.phx.gbl...
Hi,

I'm using C# + webDAV to create a draft message to be sent in a user's
Drafts folder.

I can create the message successfully, however when I open the message in
outlook, it doesn't show the 'send' button, (only 'reply' etc as if it was
a received message).

I'm using exchange explorer to see the difference in webDAV properties
with drafts created normally from Outlook, but can't figure out which
property is responsible for showing the 'send' button.

Any hints would be appreciated.

Thanks,

Wiebe Tijsma
Apr 5 '07 #2

P: n/a
Hi Henning,

Thanks for your response.

Basically the issue is the same as described on the following urls, but
there was never a solution:
http://stenz.livejournal.com/256254.html
http://www.thescripts.com/forum/post2008424-3.html

I'm not using any PROPPATCH command (yet), just a PUT command.

By default, the
http://schemas.microsoft.com/exchang...okmessageclass property is
set to "IPM.Note", same as the message that does show the 'send' button
in the drafts folder.

Best Regards,

Wiebe Tijsma
Henning Krause [MVP - Exchange] schreef:
Hello,

have you set the message class correctly?

Best regards,
Henning Krause

"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
news:el**************@TK2MSFTNGP03.phx.gbl...
>Hi,

I'm using C# + webDAV to create a draft message to be sent in a user's
Drafts folder.

I can create the message successfully, however when I open the message
in outlook, it doesn't show the 'send' button, (only 'reply' etc as if
it was a received message).

I'm using exchange explorer to see the difference in webDAV properties
with drafts created normally from Outlook, but can't figure out which
property is responsible for showing the 'send' button.

Any hints would be appreciated.

Thanks,

Wiebe Tijsma
Apr 5 '07 #3

P: n/a
Hello,

After the PUT command, you should issue a PROPPATCH command, setting the
http://schemas.microsoft.com/exchang...okmessageclass property to
IPM.NOTE.

Best regards,
Henning Krause

"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hi Henning,

Thanks for your response.

Basically the issue is the same as described on the following urls, but
there was never a solution:
http://stenz.livejournal.com/256254.html
http://www.thescripts.com/forum/post2008424-3.html

I'm not using any PROPPATCH command (yet), just a PUT command.

By default, the http://schemas.microsoft.com/exchang...okmessageclass
property is set to "IPM.Note", same as the message that does show the
'send' button in the drafts folder.

Best Regards,

Wiebe Tijsma
Henning Krause [MVP - Exchange] schreef:
>Hello,

have you set the message class correctly?

Best regards,
Henning Krause

"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
news:el**************@TK2MSFTNGP03.phx.gbl...
>>Hi,

I'm using C# + webDAV to create a draft message to be sent in a user's
Drafts folder.

I can create the message successfully, however when I open the message
in outlook, it doesn't show the 'send' button, (only 'reply' etc as if
it was a received message).

I'm using exchange explorer to see the difference in webDAV properties
with drafts created normally from Outlook, but can't figure out which
property is responsible for showing the 'send' button.

Any hints would be appreciated.

Thanks,

Wiebe Tijsma
Apr 5 '07 #4

P: n/a
Hi Henning,

As stated in the previous message, when the PUT command is used the "
http://schemas.microsoft.com/exchange/outlookmessageclass" defaults to
'IPM.Note'.

I've issued the PROPPATCH explicitly now (making it uppercase to be sure
as you typed it), but it doesn't make a difference.

I'll quote Eric Smith (http://stenz.livejournal.com/256254.html) here
(he has exactly the same problem):


I have a .NET (ASP.NET) app that can successfully create an email, put
it into a user's Drafts folder, attach files to it, and even send it
out. Except that the client doesn't want it to auto send, they want a
human to review it, and then have the human press "Send" on each email.
So it stops just short of sending out and just leaves the message in the
Drafts folder.
Fine.
Except that when you use WebDAV to create an email and put it into the
Drafts folder, it appears that it marks it as Sent in the sense that it
no longer has the "Send" button, but it does have the Reply, Forward,
etc buttons. You can do a "Send Again" action on it, but that is too
much to ask of someone who just wants to click through, opening them,
and then sending them.

Anyone know why it is doing this?

Do you know the property that can be changed (and to what value) via a
proppatch call in order to make it editable?

I have been looking all over and I used to have a reference page on MSDN
for proppatch and the XML properties that the Exchange WebDAV wants for
its emails, but MS has moved it on me and now I can't find it at all via
Google.
Best Regards,

Wiebe Tijsma
Henning Krause [MVP - Exchange] schreef:
Hello,

After the PUT command, you should issue a PROPPATCH command, setting the
http://schemas.microsoft.com/exchang...okmessageclass property to
IPM.NOTE.

Best regards,
Henning Krause

"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>Hi Henning,

Thanks for your response.

Basically the issue is the same as described on the following urls,
but there was never a solution:
http://stenz.livejournal.com/256254.html
http://www.thescripts.com/forum/post2008424-3.html

I'm not using any PROPPATCH command (yet), just a PUT command.

By default, the
http://schemas.microsoft.com/exchang...okmessageclass property is
set to "IPM.Note", same as the message that does show the 'send'
button in the drafts folder.

Best Regards,

Wiebe Tijsma
Henning Krause [MVP - Exchange] schreef:
>>Hello,

have you set the message class correctly?

Best regards,
Henning Krause

"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
news:el**************@TK2MSFTNGP03.phx.gbl...
Hi,

I'm using C# + webDAV to create a draft message to be sent in a
user's Drafts folder.

I can create the message successfully, however when I open the
message in outlook, it doesn't show the 'send' button, (only 'reply'
etc as if it was a received message).

I'm using exchange explorer to see the difference in webDAV
properties with drafts created normally from Outlook, but can't
figure out which property is responsible for showing the 'send' button.

Any hints would be appreciated.

Thanks,

Wiebe Tijsma
Apr 5 '07 #5

P: n/a
More information:

There's a thread from 2005:
http://www.devnewsgroups.net/group/m...opic30460.aspx

[quote "Glen"]
You need to include setting the (PR_MESSAGE_FLAGS)
http://schemas.microsoft.com/mapi/proptag/x0E070003 to something in
your proppatch. For most of my public folder emails PR_MESSAGE_FLAGS is
set to 3 which is a combination of MSGFLAG_READ (which is 1) and
MSGFLAG_UNMODIFIED which ( is 2). If you use Outlookspy or Mdbvu32 you
can work out what the value you want is.
[/quote]

Question:
I'm unable to change the PR_MESSAGE_FLAGS to 9 (MSGFLAG_READ
| MSGFLAG_UNSENT), after a message is created.

The webDAV query succeeds, however the property is not changed.

my webdav query to change the property afterwards:

@"<a:propertyupdate
xmlns:a='DAV:'
xmlns:m='http://schemas.microsoft.com/mapi/proptag/'
<a:set>
<a:prop>
<m:0x0E070003>9</m:0x0E070003>
</a:prop>
</a:set>
</a:propertyupdate>";

Editing this in OutlookSpy gives the following error message:
"Could not edit the property: HrSetOneProp returned MAPI_E_COMPUTED"

Is there a way to initially set this property immediately in the "PUT"
command?

Thanks for any hints...

Wiebe Tijsma
Wiebe Tijsma schreef:
Hi Henning,

As stated in the previous message, when the PUT command is used the "
http://schemas.microsoft.com/exchange/outlookmessageclass" defaults to
'IPM.Note'.

I've issued the PROPPATCH explicitly now (making it uppercase to be sure
as you typed it), but it doesn't make a difference.

I'll quote Eric Smith (http://stenz.livejournal.com/256254.html) here
(he has exactly the same problem):

>
I have a .NET (ASP.NET) app that can successfully create an email, put
it into a user's Drafts folder, attach files to it, and even send it
out. Except that the client doesn't want it to auto send, they want a
human to review it, and then have the human press "Send" on each email.
So it stops just short of sending out and just leaves the message in the
Drafts folder.
Fine.
Except that when you use WebDAV to create an email and put it into the
Drafts folder, it appears that it marks it as Sent in the sense that it
no longer has the "Send" button, but it does have the Reply, Forward,
etc buttons. You can do a "Send Again" action on it, but that is too
much to ask of someone who just wants to click through, opening them,
and then sending them.

Anyone know why it is doing this?

Do you know the property that can be changed (and to what value) via a
proppatch call in order to make it editable?

I have been looking all over and I used to have a reference page on MSDN
for proppatch and the XML properties that the Exchange WebDAV wants for
its emails, but MS has moved it on me and now I can't find it at all via
Google.

Best Regards,

Wiebe Tijsma
Henning Krause [MVP - Exchange] schreef:
>Hello,

After the PUT command, you should issue a PROPPATCH command, setting
the http://schemas.microsoft.com/exchang...okmessageclass property
to IPM.NOTE.

Best regards,
Henning Krause

"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>>Hi Henning,

Thanks for your response.

Basically the issue is the same as described on the following urls,
but there was never a solution:
http://stenz.livejournal.com/256254.html
http://www.thescripts.com/forum/post2008424-3.html

I'm not using any PROPPATCH command (yet), just a PUT command.

By default, the
http://schemas.microsoft.com/exchang...okmessageclass property is
set to "IPM.Note", same as the message that does show the 'send'
button in the drafts folder.

Best Regards,

Wiebe Tijsma
Henning Krause [MVP - Exchange] schreef:
Hello,

have you set the message class correctly?

Best regards,
Henning Krause

"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
news:el**************@TK2MSFTNGP03.phx.gbl...
Hi,
>
I'm using C# + webDAV to create a draft message to be sent in a
user's Drafts folder.
>
I can create the message successfully, however when I open the
message in outlook, it doesn't show the 'send' button, (only
'reply' etc as if it was a received message).
>
I'm using exchange explorer to see the difference in webDAV
properties with drafts created normally from Outlook, but can't
figure out which property is responsible for showing the 'send'
button.
>
Any hints would be appreciated.
>
Thanks,
>
Wiebe Tijsma
Apr 6 '07 #6

P: n/a
Hello,

if I create the draft message via PROPATCH, the message is treated as draft
message in Outlook. But I didn't manage to PUT a message into the drafts
folder and change the message to a draft. The messageflag property is
essentially readonly.

Setting the urn:schemas:httmail:submitted to false does not work either.

Perhaps you should construct your message with the PROPPATCH approach: First
create the element and add the recipients as necessary, set the body and the
subject. After that, upload attachments via the PUT command to the element.
This will retain the draft status.

Best regards,
Henning Krause
"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
news:e5**************@TK2MSFTNGP02.phx.gbl...
More information:

There's a thread from 2005:
http://www.devnewsgroups.net/group/m...opic30460.aspx

[quote "Glen"]
You need to include setting the (PR_MESSAGE_FLAGS)
http://schemas.microsoft.com/mapi/proptag/x0E070003 to something in your
proppatch. For most of my public folder emails PR_MESSAGE_FLAGS is set to
3 which is a combination of MSGFLAG_READ (which is 1) and
MSGFLAG_UNMODIFIED which ( is 2). If you use Outlookspy or Mdbvu32 you can
work out what the value you want is.

Question:
I'm unable to change the PR_MESSAGE_FLAGS to 9 (MSGFLAG_READ
| MSGFLAG_UNSENT), after a message is created.

The webDAV query succeeds, however the property is not changed.

my webdav query to change the property afterwards:

@"<a:propertyupdate
xmlns:a='DAV:'
xmlns:m='http://schemas.microsoft.com/mapi/proptag/'
<a:set>
<a:prop>
<m:0x0E070003>9</m:0x0E070003>
</a:prop>
</a:set>
</a:propertyupdate>";

Editing this in OutlookSpy gives the following error message:
"Could not edit the property: HrSetOneProp returned MAPI_E_COMPUTED"

Is there a way to initially set this property immediately in the "PUT"
command?

Thanks for any hints...

Wiebe Tijsma
Wiebe Tijsma schreef:
>Hi Henning,

As stated in the previous message, when the PUT command is used the "
http://schemas.microsoft.com/exchange/outlookmessageclass" defaults to
'IPM.Note'.

I've issued the PROPPATCH explicitly now (making it uppercase to be sure
as you typed it), but it doesn't make a difference.

I'll quote Eric Smith (http://stenz.livejournal.com/256254.html) here (he
has exactly the same problem):

>>
I have a .NET (ASP.NET) app that can successfully create an email, put it
into a user's Drafts folder, attach files to it, and even send it out.
Except that the client doesn't want it to auto send, they want a human to
review it, and then have the human press "Send" on each email. So it
stops just short of sending out and just leaves the message in the Drafts
folder.
Fine.
Except that when you use WebDAV to create an email and put it into the
Drafts folder, it appears that it marks it as Sent in the sense that it
no longer has the "Send" button, but it does have the Reply, Forward, etc
buttons. You can do a "Send Again" action on it, but that is too much to
ask of someone who just wants to click through, opening them, and then
sending them.

Anyone know why it is doing this?

Do you know the property that can be changed (and to what value) via a
proppatch call in order to make it editable?

I have been looking all over and I used to have a reference page on MSDN
for proppatch and the XML properties that the Exchange WebDAV wants for
its emails, but MS has moved it on me and now I can't find it at all via
Google.


Best Regards,

Wiebe Tijsma
Henning Krause [MVP - Exchange] schreef:
>>Hello,

After the PUT command, you should issue a PROPPATCH command, setting the
http://schemas.microsoft.com/exchang...okmessageclass property to
IPM.NOTE.

Best regards,
Henning Krause

"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl.. .
Hi Henning,

Thanks for your response.

Basically the issue is the same as described on the following urls, but
there was never a solution:
http://stenz.livejournal.com/256254.html
http://www.thescripts.com/forum/post2008424-3.html

I'm not using any PROPPATCH command (yet), just a PUT command.

By default, the
http://schemas.microsoft.com/exchang...okmessageclass property is
set to "IPM.Note", same as the message that does show the 'send' button
in the drafts folder.

Best Regards,

Wiebe Tijsma
Henning Krause [MVP - Exchange] schreef:
Hello,
>
have you set the message class correctly?
>
Best regards,
Henning Krause
>
"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
news:el**************@TK2MSFTNGP03.phx.gbl.. .
>Hi,
>>
>I'm using C# + webDAV to create a draft message to be sent in a
>user's Drafts folder.
>>
>I can create the message successfully, however when I open the
>message in outlook, it doesn't show the 'send' button, (only 'reply'
>etc as if it was a received message).
>>
>I'm using exchange explorer to see the difference in webDAV
>properties with drafts created normally from Outlook, but can't
>figure out which property is responsible for showing the 'send'
>button.
>>
>Any hints would be appreciated.
>>
>Thanks,
>>
>Wiebe Tijsma
>
[/quote]

Apr 6 '07 #7

P: n/a
Hi,

Hmm interesting, didn't know you could issue a propertyupdate on a
non-existent document.

I tried it before, but always received a HTTP/1.1 403 Forbidden
response, but now I tried it by setting only a subject, and it works, so
it must be one of the properties that gave the error.

Thanks a lot!

Wiebe
Henning Krause [MVP - Exchange] schreef:
Hello,

if I create the draft message via PROPATCH, the message is treated as
draft message in Outlook. But I didn't manage to PUT a message into the
drafts folder and change the message to a draft. The messageflag
property is essentially readonly.

Setting the urn:schemas:httmail:submitted to false does not work either.

Perhaps you should construct your message with the PROPPATCH approach:
First create the element and add the recipients as necessary, set the
body and the subject. After that, upload attachments via the PUT command
to the element. This will retain the draft status.

Best regards,
Henning Krause
"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
news:e5**************@TK2MSFTNGP02.phx.gbl...
>More information:

There's a thread from 2005:
http://www.devnewsgroups.net/group/m...opic30460.aspx
[quote "Glen"]
You need to include setting the (PR_MESSAGE_FLAGS)
http://schemas.microsoft.com/mapi/proptag/x0E070003 to something in
your proppatch. For most of my public folder emails PR_MESSAGE_FLAGS
is set to 3 which is a combination of MSGFLAG_READ (which is 1) and
MSGFLAG_UNMODIFIED which ( is 2). If you use Outlookspy or Mdbvu32 you
can work out what the value you want is.

Question:
I'm unable to change the PR_MESSAGE_FLAGS to 9 (MSGFLAG_READ
| MSGFLAG_UNSENT), after a message is created.

The webDAV query succeeds, however the property is not changed.

my webdav query to change the property afterwards:

@"<a:propertyupdate
xmlns:a='DAV:'
xmlns:m='http://schemas.microsoft.com/mapi/proptag/'
<a:set>
<a:prop>
<m:0x0E070003>9</m:0x0E070003>
</a:prop>
</a:set>
</a:propertyupdate>";

Editing this in OutlookSpy gives the following error message:
"Could not edit the property: HrSetOneProp returned MAPI_E_COMPUTED"

Is there a way to initially set this property immediately in the "PUT"
command?

Thanks for any hints...

Wiebe Tijsma
Wiebe Tijsma schreef:
>>Hi Henning,

As stated in the previous message, when the PUT command is used the "
http://schemas.microsoft.com/exchange/outlookmessageclass" defaults
to 'IPM.Note'.

I've issued the PROPPATCH explicitly now (making it uppercase to be
sure as you typed it), but it doesn't make a difference.

I'll quote Eric Smith (http://stenz.livejournal.com/256254.html) here
(he has exactly the same problem):

>>>
I have a .NET (ASP.NET) app that can successfully create an email,
put it into a user's Drafts folder, attach files to it, and even send
it out. Except that the client doesn't want it to auto send, they
want a human to review it, and then have the human press "Send" on
each email. So it stops just short of sending out and just leaves the
message in the Drafts folder.
Fine.
Except that when you use WebDAV to create an email and put it into
the Drafts folder, it appears that it marks it as Sent in the sense
that it no longer has the "Send" button, but it does have the Reply,
Forward, etc buttons. You can do a "Send Again" action on it, but
that is too much to ask of someone who just wants to click through,
opening them, and then sending them.

Anyone know why it is doing this?

Do you know the property that can be changed (and to what value) via
a proppatch call in order to make it editable?

I have been looking all over and I used to have a reference page on
MSDN for proppatch and the XML properties that the Exchange WebDAV
wants for its emails, but MS has moved it on me and now I can't find
it at all via Google.


Best Regards,

Wiebe Tijsma
Henning Krause [MVP - Exchange] schreef:
Hello,

After the PUT command, you should issue a PROPPATCH command, setting
the http://schemas.microsoft.com/exchang...okmessageclass
property to IPM.NOTE.

Best regards,
Henning Krause

"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl. ..
Hi Henning,
>
Thanks for your response.
>
Basically the issue is the same as described on the following urls,
but there was never a solution:
http://stenz.livejournal.com/256254.html
http://www.thescripts.com/forum/post2008424-3.html
>
I'm not using any PROPPATCH command (yet), just a PUT command.
>
By default, the
http://schemas.microsoft.com/exchang...okmessageclass property
is set to "IPM.Note", same as the message that does show the 'send'
button in the drafts folder.
>
Best Regards,
>
Wiebe Tijsma
>
>
Henning Krause [MVP - Exchange] schreef:
>Hello,
>>
>have you set the message class correctly?
>>
>Best regards,
>Henning Krause
>>
>"Wiebe Tijsma" <ne********@CAPITALStijsma.comwrote in message
>news:el**************@TK2MSFTNGP03.phx.gbl. ..
>>Hi,
>>>
>>I'm using C# + webDAV to create a draft message to be sent in a
>>user's Drafts folder.
>>>
>>I can create the message successfully, however when I open the
>>message in outlook, it doesn't show the 'send' button, (only
>>'reply' etc as if it was a received message).
>>>
>>I'm using exchange explorer to see the difference in webDAV
>>properties with drafts created normally from Outlook, but can't
>>figure out which property is responsible for showing the 'send'
>>button.
>>>
>>Any hints would be appreciated.
>>>
>>Thanks,
>>>
>>Wiebe Tijsma
>>
[/quote]
Apr 10 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.