// create inbox if not exist
if (mailboxManager.mailboxExists(inbox, mailboxSession) == false) {
mailboxManager.createMailbox(inbox, mailboxSession);
}
mailboxManager.getMailbox(MailboxPath.inbox(username), mailboxSession).appendMessage(new MimeMessageInputStream(mail.getMessage()), new Date(), mailboxSession, true, null);
mailboxManager.endProcessingRequest(mailboxSession);
response = new SMTPResponse(SMTPRetCode.MAIL_OK, DSNStatus.getStatus(DSNStatus.SUCCESS,DSNStatus.CONTENT_OTHER)+" Message received");
} catch (MessagingException e) {
session.getLogger().info("Unexpected error handling DATA stream",e);