By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,095 Members | 1,586 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,095 IT Pros & Developers. It's quick & easy.

What is the CK variable in OWA/Exchange messages

P: 1
Hello All,

I'm attempting to write a python script to forward email from an OWA account that does not allow automatic forwarding or SMTP/IMAP access. I've hit a stumbling block regarding the "CK" variables that OWA sends with its sendmail requests. I can retrieve messages using urllib2 and parse them manually or BeautifulSoup and extract subject, body, etc as well as the "CK" variable that I assume is some kind of message checksum. When I create a send mail request with all of this extracted info, I get an error message with a different CK variable. Somehow this variable keeps changing and I don't know how, why, or even what this variable is. Any help is appreciated.

In the code below, message_html is the actual message html retrieved from OWA in premium mode.

Full code attached

Expand|Select|Wrap|Line Numbers
  1.     checksum = re.findall(r'(?<=var a_sCK = ").{32}', message_html)
  2.     ck = re.sub(r"\\","",checksum[0])
  4. #later on this ck variable is embedded in an xml url #body request like so:
  6.  output = """<params><Id>%s</Id><CK>%s</CK><Subj>%s</Subj><Imp>1</Imp><Sensitivity>0</Sensitivity><Body>%s</Body><Text>0</Text><DeliveryRcpt>0</DeliveryRcpt><ReadRcpt>0</ReadRcpt><To><item><Rcp AO="3" DN="" EM="" RT="SMTP"></Rcp></item></To></params>""" % (id,ck,subject,body)
  8. #then the following error comes up:
  10. <div id=err _msg="The action could not be completed because of a conflict with the original item. The conflict may have occurred when an existing item was updated on another computer or device. Open the item again and try making your changes. If the problem continues, contact technical support for your organization." _cd=1></div><div id=divCstInfo itemId="---hidden message id----" ck="--value of ck that does not match that which was extracted and sent ---"></div>
Attached Files
File Type: txt (8.4 KB, 558 views)
Sep 3 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.