Note that there are some explanatory texts on larger screens.

plurals
  1. POPython: how to store a draft email with BCC recipients to Exchange Server via IMAP?
    text
    copied!<p>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.</p> <p>The following Python code reproduces this behavior:</p> <pre><code>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() </code></pre> <p>If I run this code, a draft gets stored into the <code>Draft</code> folder on the Exchange Server. But if I look at the draft with MS Outlook, it does not include the <code>bcc</code> recipient (<code>message['bcc'] = 'testbcc@test.com'</code>). <code>Message</code>, <code>to</code>, <code>from</code>, <code>cc</code> ok, no error.</p> <p>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.</p> <p>Any help very much appreciated. Thanks. BTW, MAPI is not an option.</p> <p><strong>Update</strong>: Thanks. <code>X-Receiver</code> 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.</p> <p><strong>Conclusion</strong>: thanks for the input. Actually, the code works just fine. See below for the answer that I found.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload