win32com: create email message in windows default app?
Alex Martelli
aleax at aleax.it
Mon Sep 8 07:38:48 EDT 2003
Mark Hahn wrote:
>> But what is "windows default email application" ?
>
> I don't know, except that windows applications such as outlook and outlook
> express will ask "Outlook is no longer the default email application,
> would
> you like to make it the default?". So somebody somewhere inside of
> windows thinks there is a default.
>
> Also, when you click on a mailto: link in a web browser, only one mail
> message comes up from one mail application, so it must be the default
> email
> application. How do I get to that default email application and tell it
> to open a message for me?
What about "opening" the mailto URL you need with Windows' "start"? e.g.
os.system("start mailto:foo at bar.com")
? Or of course you may use more advanced COM Monicker handling for
the "mailto:etc" monicker -- I'm sure the COM parts of win32all and/or
ctypes let you muck with Monickers as needed (even though the internals
of low-level Monicker API's, as I recall from my Windows days, are as
mucky as the overall functionality is neat, still, if the functionality
of "start" isn't sufficient, low-level Monicker API's will no doubt
give you all that it IS feasible to obtain on Windows for this purpose),
Oh btw,
os.system('start "mailto:foo at bar.com?subject=what ever"')
if you want to pump the subject into the msg as well as the recipient.
Alex
More information about the Python-list
mailing list