Skip to content
Advertisement

Python: launch default mail client on the system

I’m fairly new to Python and I’m trying to write a plugin for a text editor.

I want to know if there is a way to launch default system E-Mail client from python code.

Advertisement

Answer

With pywin32:

JavaScript

Update

Ah, I misread your question and presumed you’re on Win platform. A platform independent solution would be open mailto link in a browser, like

JavaScript

Update 2

Some additional research (in fact, first two pages of google search) revealed this excellent snippet:

JavaScript

Enjoy.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement