I try to store a draft e-mail via IMAP to a folder running on MS Exchange. Everything ok, except that Bcc recipients don't get shown in the draft message stored on the server. Bcc recipients also don't receive the email if I send it with MS Outlook. If I read the message back with Python after I have stored it on the server, I can see the Bcc in the draft.
The following Python code reproduces this behavior:
import imaplib 
import time 
from email.MIMEMultipart import MIMEMultipart 
from email.MIMEText import MIMEText 
message = MIMEMultipart() 
message['Subject'] = 'Test Draft' 
message['From'] = 'test@test.net' 
message['to'] = 'test@test.com' 
message['cc'] = 'testcc@test.com' 
message['bcc'] = 'testbcc@test.com' 
message.attach(MIMEText('This is a test.\n')) 
server= imaplib.IMAP4('the.ser.ver.ip') 
server.login('test', 'test') 
server.append("Drafts" 
              ,'\Draft' 
              ,imaplib.Time2Internaldate(time.time()) 
              ,str(message)) 
server.logout() 
If I run this code, a draft gets stored into the Draft folder on the Exchange Server. But if I look at the draft with MS Outlook, it does not include the bcc recipient (message['bcc'] = 'testbcc@test.com'). Message, to, from, cc ok, no error.
If I download drafts that already include a bcc from an Exchange folder, I can also see the bcc. Only uploading doesn't work for me.
Any help very much appreciated. Thanks. BTW, MAPI is not an option.
Update: X-Receiver didn't work for me. As for playing around with an IMAP-Folder in Outlook, I got an interesting result. If I access the draft via the IMAP-Folder in Outlook, I see the bcc. But if I access it via the MAPI-Folder, I don't see it. Will play a little bit around with that.
Conclusion: Actually, the code works just fine. See below for the answer that I found.