Results 1 to 2 of 2

Thread: webdav add attachment

  1. #1
    Join Date
    Jul 2010
    Posts
    1

    webdav add attachment

    hi,

    im using webdav, httpclient api, to send email to exchange 2007

    with the following code i send a message successfully:
    Code:
    Code:
    String strTempRelativeURI="https://webmail/exchange/user@email.com/Drafts/"; 
    
    PutMethod pm = new PutMethod ("https://webmail/exchange/user@email.com/Drafts/test5.eml/"); 
    pm.setRequestBody(body); 
    client.executeMethod(pm); 
    
    move(strTempRelativeURI + "test5.EML", strSubRelativeURI, null); 
    
    
    public static void move(String urlOrigem, String urlDest, HttpConnection conn) 
    throws Exception 
    { 
    
    MoveMethod method = new MoveMethod(urlOrigem, urlDest,true); 
    try { 
    int rc = client.executeMethod(method); 
    System.out.println("Return Code: " + rc); 
    } 
    
    finally { 
    // release any connection resources used by the method 
    method.releaseConnection(); 
    } 
    
    }
    how can send the message with an attachment?


    thanks in advance

  2. #2
    Join Date
    Jun 2006
    Posts
    623

    Re: webdav add attachment

    I think that you just need to use PUT method to add attachment to a message. Attachment path must be like below:

    Code:
    http://server/exchange/User1/Inbox/message1.eml/attachment1.txt
    As you see message is like folder for their attachments

Similar Threads

  1. Why Firefox only able to download attachment as "attachment.ashx"
    By DeepakTij in forum Technology & Internet
    Replies: 4
    Last Post: 30-12-2011, 05:28 PM
  2. What do you mean by WebDav URL?
    By Zelman in forum Technology & Internet
    Replies: 5
    Last Post: 15-06-2011, 10:33 AM
  3. How to fix WebDAV support
    By Selva-Star in forum Technology & Internet
    Replies: 3
    Last Post: 21-12-2010, 08:13 PM
  4. What is WebDAV and its Uses?
    By michaels in forum Software Development
    Replies: 4
    Last Post: 27-02-2010, 06:27 AM
  5. How to enable WebDAV in IIS
    By XDRoX in forum Tips & Tweaks
    Replies: 1
    Last Post: 28-07-2009, 10:55 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,877,832.94472 seconds with 17 queries