[python-win32] send to mail recipient

Her Him dvrhax at yahoo.com
Thu Jul 28 04:25:20 CEST 2011


I've scoured the Internet for a way to mimic the functionality of the windows 
'Send to Mail Recipient' shortcut, but the best I've come up with are a few C++ 
examples like this one: 
http://www.codeproject.com/KB/shell/sendtomail.aspx?display=Mobile.
Unfortunately C++ and I don't get along and I've had a terrible time trying to 
translate them into python using the pywin32 module.  I understand  that there 
are ways using smtp etc to send an email I've used them before on other projects 
but that's not what I'm trying to accomplish here.  What I want is a way to pop 
the default email client (In my case Lotus Notes) with a new message and a file 
attached waiting for the user to type the body of the email add a recipient and 
send (Just like the 'Send to Mail Recipient' shortcut.)  My understanding is 
that basically you have to emulate the drop target of the 'Send to Mail 
Recipient' shortcut call its drop function and provide it an IDataObject pr 
something similar and it just works.  But for the life of me I can't accomplish 
this.  If anyone out ther can help it would be very appreciated.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110727/6d28c187/attachment.html>


More information about the python-win32 mailing list