Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Call a mail app with mailto

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 769 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post