Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #101552

use Python and an outlook: protocol URL to bring up a specific email

Newsgroups comp.lang.python
Date 2016-01-12 08:51 -0800
Message-ID <ab47c98f-69af-49ee-b1c4-bced0c48a001@googlegroups.com> (permalink)
Subject use Python and an outlook: protocol URL to bring up a specific email
From jkn <jkn_gg@nicorp.f9.co.uk>

Show all headers | View raw


Hi all
    a little OS/windows specific, I'm afraid:

In Windows, there exists a part-supported 'outlook protocol' to obtain and use
email references within Outlook as URL. You have to go through various shenanagins to enable this and to get Outlook to give you access to the URLs - see for instance:

http://www.slipstick.com/problems/outlook-missing-outlook-protocol/
http://superuser.com/questions/834019/using-outlook-protocol-open-current-instance-of-outlook-not-new-instance
http://www.davidtan.org/create-hyperlinks-to-outlook-messages-folders-contacts-events/

Having gone through all of this I get a refernce URL on my clipboard or whatever:

"outlook:00000000BB1BBDFACA3A4D41A98037A1D85A8DA50700E6FBFC004227134D97632785EE69C220003C0208DEA10000DAC09B3B9C648E4597BE2A013A6E8B84000026F87CCA0000"

(This refers to a particular email in Outlook)

What I want to do is then use Python to invoke this URL to cause Outlook to
bring up the referenced email. I'm stumbling here; I've tried urllib.urlopen(),
and os.startfile(), but I am getting errors from urllib in either case:

    def open_unknown(self, fullurl, data=None):
        """Overridable interface to open unknown URL type."""
        type, url = splittype(fullurl)
        raise IOError, ('url error', 'unknown url type', type)

ie. the 'outlook' protocol is unknown. 

I happy to carve some code without using urllib, but I am not clear what I
actually need to do to 'open' such a URL using this protocol. FWIW I can paste
this URL into Windows Explorer and I get the referenced email popping up ;-)

Thanks for any pointers

    Regards
    Jon N

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

use Python and an outlook: protocol URL to bring up a specific email jkn <jkn_gg@nicorp.f9.co.uk> - 2016-01-12 08:51 -0800
  Re: use Python and an outlook: protocol URL to bring up a specific email Chris Angelico <rosuav@gmail.com> - 2016-01-13 04:10 +1100
    Re: use Python and an outlook: protocol URL to bring up a specific email jkn <jkn_gg@nicorp.f9.co.uk> - 2016-01-12 09:22 -0800
  Re: use Python and an outlook: protocol URL to bring up a specific email eryk sun <eryksun@gmail.com> - 2016-01-12 11:37 -0600
  Re: use Python and an outlook: protocol URL to bring up a specific email Chris Angelico <rosuav@gmail.com> - 2016-01-13 04:52 +1100
    Re: use Python and an outlook: protocol URL to bring up a specific email Christian Gollwitzer <auriocus@gmx.de> - 2016-01-12 19:04 +0100
  Re: use Python and an outlook: protocol URL to bring up a specific email eryk sun <eryksun@gmail.com> - 2016-01-12 13:12 -0600

csiph-web