I am developing an activesync based email client and overall it seems to be going well. I have been having some trouble. I've been doing quite a bit of reading, googling and searching and I'm not finding the answer I seek. Now I bring my question here
to the great and powerful gurus of activesyncland.
Basically all i want to do is a SmartForward. The message in question has attachments. In fact it could have several attachments. But we cannot just say "Hey, forward that message" to Exchange, because the client may have removed one or more attachments before sending. So, basically I need to know how to say "Hey Exchange, forward Email X from Folder Y, include Attachments 1, 2 and 7."
The URL I am using the post the message is:
POST http://MYSERVERURL/Microsoft-Server-ActiveSync?Cmd=SmartForward&User=MYTESTUSER&deviceId=MYDEViCEID&deviceType=MYDEVICETYPE
The XML I currently have is:
<SmartForward xmlns="ComposeMail:">
<ClientId>MYCLIENTID</ClientId>
<Source>
<FolderId>12</FolderId>
<ItemId>12:1</ItemId>
</Source>
<Mime>
MIME-Version=1.0
From: MYTESTUSER@MYSERVER.COM
To: MY_OTHER_TEST_USER@MYSERVER.COM
Cc: <<empty string>>
Bcc: <empty string>>
Subject: MY TEST SUBJECT
Content-Type: multipart/mixed; boundary="MIME_MESSAGE_SECTION_BODY"
--MIME_MESSAGE_SECTION_BODY
Content-Type: text/html
Content-Transfer-Type: 7bit;
Augue in, porttitor a nisi ut? In ac sit augue tristique scelerisque. Habitasse mus nisi dis? Aenean porta placerat tortor, egestas sit? Ut sit, risus elementum urna sagittis urna in, eros ultrices dictumst? Sagittis a porta lorem ac a placerat nec dictumst, pellentesque duis velit auctor et ultricies porta dignissim tristique aliquet nisi tincidunt, odio elit odio? Sed sed a habitasse elit, mauris cras placerat elementum. Montes mus? Natoque nisi, vel magna mattis augue placerat, magnis tincidunt mattis, ut ultricies, natoque. Facilisis aliquam elementum proin porta pellentesque urna nunc ac, a dolor facilisis amet mauris, dictumst, habitasse nunc integer aliquam magna placerat? Aliquam, mauris magna, vut et parturient. Duis vel, et in, lundium? Sociis cursus diam pulvinar amet mus? Sociis.
--MIME_MESSAGE_SECTION_BODY
--MIME_MESSAGE_SECTION_BODY--
</Mime>
</SmartForward>
Now, I know that I can encode my attachments just as I would with a mime message using a giant unreadable blob of base64 encoded bytes. But that would require me to send that blob to the server, transferring and storing those bytes more than once for no reason. It's also entirely possible that the data from the server hasn't been transferred yet to the client for said attachment and I don't want the client waiting around for his data to move. The above XML doesn't seem to have a place at all to tell exchange which attachments to forward and which not to forward. Readng the schema forwarded messages I don't even see where one might do that.
The user can add add one or more additional attachments if she should wish. I assume since those are originating at the client they would just be mime encoded in the mail email MIME section. But how does one instruct exchange to attach attachments P and R from the existing message on the server but not Q or S?
Thank you very much for your time, any help you could give would be appreciated.
Cosmo Kramer.
Basically all i want to do is a SmartForward. The message in question has attachments. In fact it could have several attachments. But we cannot just say "Hey, forward that message" to Exchange, because the client may have removed one or more attachments before sending. So, basically I need to know how to say "Hey Exchange, forward Email X from Folder Y, include Attachments 1, 2 and 7."
The URL I am using the post the message is:
POST http://MYSERVERURL/Microsoft-Server-ActiveSync?Cmd=SmartForward&User=MYTESTUSER&deviceId=MYDEViCEID&deviceType=MYDEVICETYPE
The XML I currently have is:
<SmartForward xmlns="ComposeMail:">
<ClientId>MYCLIENTID</ClientId>
<Source>
<FolderId>12</FolderId>
<ItemId>12:1</ItemId>
</Source>
<Mime>
MIME-Version=1.0
From: MYTESTUSER@MYSERVER.COM
To: MY_OTHER_TEST_USER@MYSERVER.COM
Cc: <<empty string>>
Bcc: <empty string>>
Subject: MY TEST SUBJECT
Content-Type: multipart/mixed; boundary="MIME_MESSAGE_SECTION_BODY"
--MIME_MESSAGE_SECTION_BODY
Content-Type: text/html
Content-Transfer-Type: 7bit;
Augue in, porttitor a nisi ut? In ac sit augue tristique scelerisque. Habitasse mus nisi dis? Aenean porta placerat tortor, egestas sit? Ut sit, risus elementum urna sagittis urna in, eros ultrices dictumst? Sagittis a porta lorem ac a placerat nec dictumst, pellentesque duis velit auctor et ultricies porta dignissim tristique aliquet nisi tincidunt, odio elit odio? Sed sed a habitasse elit, mauris cras placerat elementum. Montes mus? Natoque nisi, vel magna mattis augue placerat, magnis tincidunt mattis, ut ultricies, natoque. Facilisis aliquam elementum proin porta pellentesque urna nunc ac, a dolor facilisis amet mauris, dictumst, habitasse nunc integer aliquam magna placerat? Aliquam, mauris magna, vut et parturient. Duis vel, et in, lundium? Sociis cursus diam pulvinar amet mus? Sociis.
--MIME_MESSAGE_SECTION_BODY
--MIME_MESSAGE_SECTION_BODY--
</Mime>
</SmartForward>
Now, I know that I can encode my attachments just as I would with a mime message using a giant unreadable blob of base64 encoded bytes. But that would require me to send that blob to the server, transferring and storing those bytes more than once for no reason. It's also entirely possible that the data from the server hasn't been transferred yet to the client for said attachment and I don't want the client waiting around for his data to move. The above XML doesn't seem to have a place at all to tell exchange which attachments to forward and which not to forward. Readng the schema forwarded messages I don't even see where one might do that.
The user can add add one or more additional attachments if she should wish. I assume since those are originating at the client they would just be mime encoded in the mail email MIME section. But how does one instruct exchange to attach attachments P and R from the existing message on the server but not Q or S?
Thank you very much for your time, any help you could give would be appreciated.
Cosmo Kramer.