473,439 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,439 software developers and data experts.

add attachment using webdav

hi,

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

with the following code i send a message successfully:
Expand|Select|Wrap|Line Numbers
  1.  
  2. String strTempRelativeURI="https://webmail/exchange/user@email.com/Drafts/"; 
  3.  
  4. PutMethod pm = new PutMethod ("https://webmail/exchange/user@email.com/Drafts/test5.eml/"); 
  5. pm.setRequestBody(body); 
  6. client.executeMethod(pm); 
  7.  
  8. move(strTempRelativeURI + "test5.EML", strSubRelativeURI, null); 
  9.  
  10. public static void move(String urlOrigem, String urlDest, HttpConnection conn) 
  11. throws Exception 
  12.  
  13. MoveMethod method = new MoveMethod(urlOrigem, urlDest,true); 
  14. try { 
  15. int rc = client.executeMethod(method); 
  16. System.out.println("Return Code: " + rc); 
  17. finally { 
  18. // release any connection resources used by the method 
  19. method.releaseConnection(); 
  20.  
how can send the message with an attachment?


thanks in advance
Jul 8 '10 #1
1 2033
Try JWebDAV for Exchange http://www.independentsoft.de
Dec 14 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Viorel | last post by:
How to gett a message from Exchange Server using WebDAV?
3
by: Prakash Wadhwani | last post by:
Hi !! I have been browsing around but have not been able to find a simple, lucid solution ... or maybe I'm just too confused. I know this has been asked before by many ... but pls bear with me. ...
1
by: Sniper | last post by:
Hi guys I am retrieving an attachment using a web service. what would be the fastest way to download the attcahment ? WSE Attacahment or byte array or any other methods ??? tahnks in...
6
by: ErwinF | last post by:
Hi there, I would like to know the following: How to send send email attachments using WebDAV in VB .NET? Sample code please................... Thanks for your help.
2
by: Joe George | last post by:
Hi there, How to save email attachments, from exchange, using WebDAV in C#.NET? Sample code please................... Thanks for your help. -- Joe George
6
by: brendan_gallagher_2001 | last post by:
Hi, Does anyone know how to create an attachment using a stream in classic ASP. I can see that it can be done in ASP.Net as per the article below: Initializes a new instance of the Attachment...
7
by: Wiebe Tijsma | last post by:
Hi, I'm using C# + webDAV to create a draft message to be sent in a user's Drafts folder. I can create the message successfully, however when I open the message in outlook, it doesn't show...
0
by: Andy Fish | last post by:
Hi, I have a web application and I would like to serve the user a word document and have word open it up using webdav. I have read kb 838028 about office protocol discovery, but this only...
0
by: teddy06 | last post by:
I have written code for read mails from exchange server. I have used webdav in my code. Its was working fine once upon a time. Currently configuration settings of client has been changed . so i...
5
by: xmaverick | last post by:
Hello, I'm a newbie to perl and i'd like some assistance trying to figure out how to send an attachment using MIME::Lite. I have searched the net far and wide and have used and modify different...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.