mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 03:32:22 -05:00
SMTP: switching back to Draft then send mode over DAV
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1424 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
447258b45b
commit
6c62dbc2af
@ -2193,22 +2193,12 @@ public class DavExchangeSession extends ExchangeSession {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendMessage(MimeMessage mimeMessage) throws IOException {
|
public void sendMessage(MimeMessage mimeMessage) throws IOException {
|
||||||
try {
|
|
||||||
if (mimeMessage.getHeader("Bcc") != null) {
|
|
||||||
// need to create draft first
|
// need to create draft first
|
||||||
String itemName = UUID.randomUUID().toString() + ".EML";
|
String itemName = UUID.randomUUID().toString() + ".EML";
|
||||||
HashMap<String, String> properties = new HashMap<String, String>();
|
HashMap<String, String> properties = new HashMap<String, String>();
|
||||||
properties.put("draft", "9");
|
properties.put("draft", "9");
|
||||||
createMessage(DRAFTS, itemName, properties, mimeMessage);
|
createMessage(DRAFTS, itemName, properties, mimeMessage);
|
||||||
moveMessage(DRAFTS + '/' + itemName, SENDMSG);
|
moveMessage(DRAFTS + '/' + itemName, SENDMSG);
|
||||||
} else {
|
|
||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
|
||||||
mimeMessage.writeTo(baos);
|
|
||||||
sendMessage(baos.toByteArray());
|
|
||||||
}
|
|
||||||
} catch (MessagingException e) {
|
|
||||||
throw new IOException(e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isGzipEncoded(HttpMethod method) {
|
protected boolean isGzipEncoded(HttpMethod method) {
|
||||||
|
Loading…
Reference in New Issue
Block a user