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 {
|
// need to create draft first
|
||||||
if (mimeMessage.getHeader("Bcc") != null) {
|
String itemName = UUID.randomUUID().toString() + ".EML";
|
||||||
// need to create draft first
|
HashMap<String, String> properties = new HashMap<String, String>();
|
||||||
String itemName = UUID.randomUUID().toString() + ".EML";
|
properties.put("draft", "9");
|
||||||
HashMap<String, String> properties = new HashMap<String, String>();
|
createMessage(DRAFTS, itemName, properties, mimeMessage);
|
||||||
properties.put("draft", "9");
|
moveMessage(DRAFTS + '/' + itemName, SENDMSG);
|
||||||
createMessage(DRAFTS, itemName, properties, mimeMessage);
|
|
||||||
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