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
Bookmarks