mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 11:12: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
|
||||
public void sendMessage(MimeMessage mimeMessage) throws IOException {
|
||||
try {
|
||||
if (mimeMessage.getHeader("Bcc") != null) {
|
||||
// need to create draft first
|
||||
String itemName = UUID.randomUUID().toString() + ".EML";
|
||||
HashMap<String, String> properties = new HashMap<String, String>();
|
||||
properties.put("draft", "9");
|
||||
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());
|
||||
}
|
||||
// need to create draft first
|
||||
String itemName = UUID.randomUUID().toString() + ".EML";
|
||||
HashMap<String, String> properties = new HashMap<String, String>();
|
||||
properties.put("draft", "9");
|
||||
createMessage(DRAFTS, itemName, properties, mimeMessage);
|
||||
moveMessage(DRAFTS + '/' + itemName, SENDMSG);
|
||||
}
|
||||
|
||||
protected boolean isGzipEncoded(HttpMethod method) {
|
||||
|
Loading…
Reference in New Issue
Block a user