Call a mail app with mailto

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 18/09/2012 at 03:58, xxxxxxxx wrote:

Is it possible to open a "mailto:[email protected]" url so that the default mail application will open?
I would like to be able to add a "Contact me" button to my plugins 🙂

Rui Batista

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 18/09/2012 at 07:32, xxxxxxxx wrote:

Absolutely, Googled for "Python mailto" and five minutes later
a working example mailing me 🙂

import c4d   
from c4d import gui   
from urllib import quote   
import webbrowser   
  
def mailto(recipients, subject, body) :   
    "recipients: string with comma-separated emails (no spaces!)"   
    webbrowser.open("mailto:%s?subject=%s&body;=%s" %   
    (recipients, quote(subject), quote(body)))   
  
body_template = """Hello %(name)s!   
    How are you?"""   
  
def gen(email, name) :   
    mailto(email, "Hi!", body_template % locals())   
  
def main() :   
    gen('[email protected]','Lennart')   
       
  
  
if __name__=='__main__':   
    main()   

BUT, I'd rather see the option to be connected to a web page instead
with a emailing option. I personally don't run any mail apps on my workstation.

Cheers
Lennart

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 18/09/2012 at 07:47, xxxxxxxx wrote:

Thank you, Lennart.
I may have to create a web page for that. It may be better, yes.
Oh, by the way... send me the 11 digits of your Cinema4D serial so that I can send you Forkroot 🙂
You certainly earned it 🙂

Rui Batista