Browse by Tags

All Tags » DevMsgTeam » item   (RSS)
Showing page 1 of 2 (11 total posts)
  • Why is OOM code leaking items????

    When you use OOM under .NET, your using managed code around COM objects via the Outlook Primary Interop Assembly (PIA). When you have managed code working with COM in this way, you have to be very careful to clean-up your references. .NET will hold onto COM objects, sometimes causing leaks, and sometimes reusing them (called COM Ressurection). This leaks… void onEvent_ItemSend( object Item, ref bool Cancel ) { try { MessageBox.Show( "Application ItemSend Event Fired." , "onEvent_ItemSend" ); } catch
    Posted to Dan's WebDAV 101 (Weblog) by danba on May 6, 2008
    Filed under: Outlook, OOM, item, leak, object, ReleaseCOMObject, object item, enumerator, ressurection, foreach, onEvent_ItemSend, pia, com, interop, reference, leaking, DevMsgTeam, webdav101blog
  • HOWTO: Send Email With Attachment Using VB and WebDAV

    To send an email with WebDAV, you will you will need to create/recreate the item with a WEBDAV PUT using the MIME of the message. It gets tricky when working with attachments. To get around the complexity of sending an email with an attachment, you may want to look at using CDOSYS to build the message to send, then extract the MIME stream (MIME of the message in a string) of the resulting message. For sending the message, you would use a PUT statement to write the stream to a file in the Drafts folder
    Posted to Dan's WebDAV 101 (Weblog) by danba on March 12, 2008
    Filed under: WebDAV, Exchange, stream, attachments, attachment, VB, message, vb6, get, put, proppatch, sample, item, folder, vbscript, script, example, MOVE, destination, ##DavMailSubmissionURI##, submission, submission url, send, DavMailSubmissionURI, drafts, submit, url, DevMsgTeam
  • Howto: WebDAV SEARCH using C#

    ' This example shows how to do a SEARCH using C# // C# Example to SEARCH a mailbox. // TODO: // Add a button and double click on it // Add a multi-line text box and make it big. // Add a project reference to System.Xml, an System.Net // Paste-in the code below // Do the TODO sections in the code. using System.Xml; using System.Net; using System.IO; private void button1_Click(object sender, System.EventArgs e) { string sUri = " http://myemailserver/exchange/auser/inbox/test "; string sUserName = "";
    Posted to Dan's WebDAV 101 (Weblog) by danba on March 12, 2008
    Filed under: WebDAV, Exchange, C#, attachments, attachment, message, Csharp, managed, sample, item, folder, search, script, example, .net, code, DevMsgTeam, webdav101blog
  • Howto: WebDAV PROPFIND using VB.NET

    ' This example shows how to do a PROPFIND using VB.NET ‘ VB.NET PROPFIND ‘ TODO: Create a VB.NET winform with a button and a big multiline text box ‘ TODO: Add references to System.Web, System.XML and System.IO ‘ TODO: Add the code to the form. ‘ TODO: Do the TODO sections in the code. Imports System.Net Imports System.Web Imports System.IO Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Dim sUri As String = " http://myexserver/exchange/User1/Inbox/
    Posted to Dan's WebDAV 101 (Weblog) by danba on March 12, 2008
    Filed under: WebDAV, Exchange, attachments, attachment, message, vb.net, managed, sample, item, folder, script, example, .net, code, DevMsgTeam, webdav101blog
  • Howto: WebDAV X-MS-ENUMATTS using VBScript to enumerate attachments

    ' This example shows how to enumerate attachments on a message. X-MS-ENUMATTS will ' return phantom urls to attachments on the message. These URLs can be used with GET ' and DELETE (starting with Exchange 2003 SP1). ' For listing and reading an attachment, you will first need to get a list of attachments ' using X-MS_ENUMATTS. After getting the list of attachments you will need to parse out ' then the URL from the returned information, you can then do a GET to read the attachments. First get a list
    Posted to Dan's WebDAV 101 (Weblog) by danba on March 12, 2008
    Filed under: WebDAV, Exchange, mime, stream, attachments, attachment, VB, message, enumerate, delete, get, sample, item, folder, vbscript, script, example, X-MS-ENUMATTS, DevMsgTeam, webdav101blog
  • Howto: WebDAV COPY using VBScript

    ' This example shows how to do a COPY of a message to a folder. 'NOTE: ' • Copying or Moving items across stores is not supported (that includes maiboxes) ' • You will get a 404 (Resource Not Found) if the source item does not exist. ' • A status of 204 (No Content) will be returned if the destination item already exists ' • To force an overwrite of an existing item, add a header of “Overwrite” set to “T”. ' • Be careful specifying the destination – Example: Using a message as the source and ' a
    Posted to Dan's WebDAV 101 (Weblog) by danba on March 12, 2008
    Filed under: WebDAV, Exchange, VB, message, sample, item, folder, vbscript, script, example, COPY, MOVE, DevMsgTeam, webdav101blog
  • Howto: WebDAV MOVE using VBScript

    ' This example shows how to do a MOVE of a message to a folder. 'NOTE: ' • Copying or Moving items across stores is not supported (that includes maiboxes) ' • You will get a 404 (Resource Not Found) if the source item does not exist. ' • A status of 204 (No Content) will be returned if the destination item already exists ' • To force an overwrite of an existing item, add a header of “Overwrite” set to “T”. ' • Be careful specifying the destination – Example: Using a message as the source and ' a
    Posted to Dan's WebDAV 101 (Weblog) by danba on March 12, 2008
    Filed under: WebDAV, Exchange, VB, message, sample, item, folder, vbscript, script, example, COPY, MOVE, DevMsgTeam, webdav101blog
  • Howto: WebDAV PROPPATCH using VBScript

    'The example below demonstrates how to do a WebDAV PROPPATCH. 'The sample changes the subject of one message in the inbox. ' Note: You cannot specify a condition with a PROPPATCH; ' Note: Understand how the Depth header affects patching and you should understand how its used before using any other setting than 0. dim sHREF dim sUserName dim sPassword dim sResponse Dim HttpWebRequest dim sReq ' Body Proppatch statement sHREF = " https://myexserver/exchange/Administrator/Inbox/testabcd.EML " ' TODO:
    Posted to Dan's WebDAV 101 (Weblog) by danba on March 12, 2008
    Filed under: HOWTO, WebDAV, Exchange, change, sample, item, vbscript, vb script, proppatch vb, DevMsgTeam, webdav101blog
  • Howto: WebDAV SEARCH with range headers using VBScript

    'The example below demonstrates how to do a WebDAV SEARCH with range headers. Public Function GetItemListXML(sHREF, sUserName, sPassword, sDepth) Dim sQuery ' As String Dim sText 'As String sQuery = "<?xml version='1.0'?>" & _ "<g:searchrequest xmlns:g='DAV:'>" & _ "<g:sql>SELECT ""DAV:displayname"", " & _ """DAV:href"" " & _ "FROM SCOPE('SHALLOW TRAVERSAL OF """ & sHREF & """')" & _ " WHERE ""DAV:isfolder"" = false AND ""DAV:ishidden"" = false" &
    Posted to Dan's WebDAV 101 (Weblog) by danba on March 12, 2008
    Filed under: HOWTO, WebDAV, Exchange, headers, VB, sample, item, vbscript, vb script, search, range headers, range, DevMsgTeam, webdav101blog
  • Howto: WebDAV SEARCH using VBScript

    'The example below demonstrates how to do a WebDAV SEARCH dim strExchangeURL dim strApptStartDate dim strUser dim strPassword strUser = "Administrator" strPassword = "test" strExchangeURL = " http://myexserver/exchange/Administrator/Calendar/ " strApptStartDate = "2004-04-09T15:00:00Z" Dim sRet strQuery = "<?xml version='1.0'?>" & _ "<g:searchrequest xmlns:g='DAV:' >" & _ "<g:sql>SELECT " & vbCrLf & _ """urn:schemas:calendar:alldayevent"", " & vbCrLf & _
    Posted to Dan's WebDAV 101 (Weblog) by danba on March 12, 2008
    Filed under: HOWTO, WebDAV, Exchange, VB, sample, item, vbscript, vb script, search, DevMsgTeam, webdav101blog
1 2 Next >

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker