I have used WebDAV to create messages directly into an Exchange Mailbox in the past. Using some extended attributes I was able to make it also appear that the message had been sent, relayed, and was in a mailbox's inbox. You might consider this a spoofed message, but the purpose is for creating email versions of compliance data for achiving (such as taking Microsoft OCS conversations and converting it to an email message for archival).
I'm trying to wrap my head around how to do this with the new Exchange 2010 API. Creating a new draft message is easy:
EmailMessage message = new EmailMessage(service);
message.Subject = "Hello from the EWS Managed API";
message.Body = "Now that's easy!";
Previously, I'd set values like this to get my desired result:
Property myProperty = new Property(MessageProperty.Read.Name, MessageProperty.Read.Namespace, "0"); //try values 1,2,4,8
Property myProperty = new Property(MessageProperty.Received.Name,MessageProperty.Received.Namespace,"From MyProgram by MyProgramServer; " + ReceivedDate);
I just can't figure out how to set thes properties with the new API...
Thanks in advance..