• Login
sketchucation logo sketchucation
  • Login
⚠️ Attention | Having issues with Sketchucation Tools 5? Report Here

Add automatically a file to send by e mail

Scheduled Pinned Locked Moved Plugins
3 Posts 2 Posters 245 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 13 Aug 2011, 17:30

    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
    • T Offline
      TIG Moderator
      last edited by 13 Aug 2011, 17:52

      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 13 Aug 2011, 23:22

        @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
        1 / 1
        • First post
          3/3
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement