Add automatically a file to send by e mail
-
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
-
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%%20123See 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 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%%20123See 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!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement