[Tutor] Send attachment
cyresse at gmail.com
Fri Jul 22 01:45:04 CEST 2005
If it's Outlook, you can use the win32python library to control it via
Here's an example using VB to control Outlook -
The language differs, but the basic principle remains the same.
Create an Application.Outlook object, and then use it's methods.
I know there's a way to use the default mail client
( as in Excel VBA's - application.showdialog(xlDialogs.SendMail) ) but
blowed if I can figure it out. The above VBA bit automatically attaches the
open spreadsheet, so unsure if you can hijack it.
Good luck, and if you google how to use the default email client, let me
On 7/22/05, Jorge Louis De Castro <jorge at bcs.org.uk> wrote:
> Any ideas how I can use Python and the Windows API to open a PC's mail
> client and send an attachment?
> The idea is saving some data onto a file and then invoke the email client
> (OE or Outlook or whatever is the default on the machine) with the
> recipient's address filled in and the file ready to be sent as an
> Kinda like when we right-click on a file and select the "send to mail
> recipient" behavior.
> Been reading docs, trying out samples, and googling this for a few days to
> no avail.
> Tutor maillist - Tutor at python.org
'There is only one basic human right, and that is to do as you damn well
And with it comes the only basic human duty, to take the consequences.'
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor