We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How do I save a message in drafts on an exchange mailbox

I’d like to create a message and save it in the drafts folder on a users mailbox on the exchange server.

This is so the user can go to their outlook or whatever mail client they are using, and continue with the email and send from there.

Is this possible?


Hi Chris,

Thanks for writing to Aspose.Email support team.

Aspose.Email provides rich features to handle exchange server. You can create and save a message in drafts folder as UNSENT and then later can send this message to the intended recipients. Message can be marked as draft message by adding a header “X-Unsent” and assigning value “1” to it.

Following is the sample code which demonstrates this feature:

const string domain = @"";
const string username = @“username”;
const string password = @“password”;
NetworkCredential credential = new NetworkCredential(username, password, domain);
ExchangeWebServiceClient _client = new ExchangeWebServiceClient(“https:[//exchange.domain.com/ews/Exchange.asmx](https://exchange.domain.com/ews/Exchange.asmx)”, credential);

string draftsUri = _client.GetMailboxInfo().DraftsUri;

MailMessage msg = new MailMessage();
msg.From = "user1@domain.com";
msg.To = "user2@domain.com";
msg.TextBody = “Email Message detail”;
msg.Subject = “This is the draft message subject”;
msg.Headers.Add(“X-Unsent”, “1”);
_client.AppendMessage(draftsUri, msg);

Please feel free to write us back if you have any other query related to Aspose.Email as we will be more than happy to assist you further.

Thanks for the quick reply. This does put the message in the drafts.

However, If I go into outlook and try to edit the draft, it won’t let me.
Also the send button is unavailable.
I have added the header “X-Unsent”. I tested this using Outlook 2010.
Could this be outlook preventing me from editing this email due to some security issue, or is there another way to get this to work?


Oh by the way, the Exchange server is 2003.

So I am not using the ExchangeWebServiceClient, but the ExchangeClient

Hi Chris,

I would request you to please spare us a little time for arrangement of Exchange Server 2003 to investigate this issue further. I’ll write back here soon and share my findings with you.

Hi Chris,

Thanks for your patience.

After further investigation of this behavior at my end, it seems to me a bug, as the same code works fine when modified for usage with ExchangeWebServiceClient. In order to investigate this issue further, I have forwarded all the details to our development team under issue id: NETWORKNET-33756, and also linked this thread with the logged issue. Once the issue is fixed, you’ll be notified here automatically.

The issues you have found earlier (filed as NETWORKNET-33756) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.