sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Add automatically a file to send by e mail

    Scheduled Pinned Locked Moved Plugins
    3 Posts 2 Posters 235 Views 2 Watching
    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.
    • G Offline
      glro
      last edited by

      this code launches the email program on the computer

      UI.openURL("mailto:???@???")

      Is there a way to add automatically a file?

      i didn't find anything here http://code.google.com/intl/fr/apis/sketchup/docs/ourdoc/ui.html#openURL

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        You can't add 'arguments' to a UI.openURL() - it's a 'path' only tool.
        BUT you can write a cmd/bat file with the needed data and then open that [it 'executes'] and that can pass/use arguments written into it thus...

        START mailto;"someone@somewhere.com?subject=The%%20Title&cc=%%20&bcc=%%20&body=Hello%%20testing%%20123
        

        See here for more details http://www.robvanderwoude.com/email.php or http://www.paulsadowski.com/wsh/cmdmail.htm
        There are ways to escape the used special characters if you want...
        Just compile the message File.write to a temp file called say 'C:/Temp/emailer.cmd' then
        UI.openURL('file:///C:/Temp/emailer.cmd') to run it.
        You can even make it erase it self as it ends...

        TIG

        1 Reply Last reply Reply Quote 0
        • G Offline
          glro
          last edited by

          @tig said:

          You can't add 'arguments' to a UI.openURL() - it's a 'path' only tool.
          BUT you can write a cmd/bat file with the needed data and then open that [it 'executes'] and that can pass/use arguments written into it thus...

          START mailto;"someone@somewhere.com?subject=The%%20Title&cc=%%20&bcc=%%20&body=Hello%%20testing%%20123
          

          See here for more details http://www.robvanderwoude.com/email.php or http://www.paulsadowski.com/wsh/cmdmail.htm

          There are ways to escape the used special characters if you want...
          Just compile the message File.write to a temp file called say 'C:/Temp/emailer.cmd' then
          UI.openURL('file:///C:/Temp/emailer.cmd') to run it.
          You can even make it erase it self as it ends...

          i am not familiar with batch programs, but i shall try to understand the way to do it; thank you!

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement