Closed bonitahlee closed 4 years ago
It always returns fail when I start IMAPAppendMessageOperation. Please give me the solution. Thank you in advance :)
Here is my code.
IMAPSession imap = new IMAPSession(); imap.setUsername(email); imap.setPassword(password); imap.setHostname(imap_hostname); imap.setPort(imap_port); imap.setConnectionType(connection_type); byte[] contents = "have a nice day".getBytes(); IMAPAppendMessageOperation operation = imap.appendMessageOperation("INBOX", contents, 0); operation.start(new OperationCallback() { @Override public void succeeded() { Log.e(TAG, "success"); } @Override public void failed(MailException e) { Log.e(TAG, "fail"); } });
I found out how to use that method. I had to get bytes array from message using BufferedInputStream.
appendMessageOperation("INBOX", byte array, 0)
I'm struggling with 'importing other mail' to IMAP server.
It always returns fail when I start IMAPAppendMessageOperation. Please give me the solution. Thank you in advance :)
Here is my code.