PDA

View Full Version : Send E-Mail in Automator (Hidden)




Jeffrey903
May 28, 2006, 12:39 AM
Hello,

I just received my new macbook pro, and am trying to create an automator workflow that will take 3 pictures, create a zip of them, and e-mail them to myself all without the user knowing. Basically, if I were to lose my laptop, the finder would login to the guest account and this workflow would automatically execute. I have successfully been able to perform the first 2 steps, but can not figure out a way to send the e-mail to myself without the finder knowing.

I do not care how this works (automator action, terminal script, python, perl, etc), but it just needs to be transparent.

I have been searching all over the internet and can not find a way to do this.

If anyone knows how, I would be very appreciative.

Thanks in advance!



superbovine
May 29, 2006, 07:36 PM
it would be impossible to write a script to login to a guest account unless you are login into the shell while someone is logged into the machine with access.

the script would have to execute through permission on the account that the person logins into.

You could probably write a shell scripts or applescript that invokes a shell command or script that uses the mail unix command to send the e-mail to yourself. you'd have to invoke the script by putting in the startup items for the account or find some other method to invoke the script. doing it this way avoids the whole finder issue, although it is still possible for someone to figure what is going on.

Why would you need to e-mail yourself pictures if your laptop is lost? Just make a backup. This is probably for more harm than good.

TurboLag
May 29, 2006, 07:54 PM
I think you misunderstood the purpose. He would like to take a picture of who is using the stolen laptop, and have it emailed to himself.

Sorry I cant provide a solution.

HiRez
May 29, 2006, 07:54 PM
Why would you need to e-mail yourself pictures if your laptop is lost? Just make a backup. This is probably for more harm than good.I assume to positively ID the thief, and possibly be able to get some clues to their location? It's not a bad idea, although they would need to be signed onto an internet connection somewhere. You'd think anyone who steals a laptop would wipe the hard drive right away (or simply replace it), but then there's a lot of dumb thieves out there.

superbovine
May 29, 2006, 07:57 PM
I assume to positively ID the thief, and possibly be able to get some clues to their location? It's not a bad idea, although they would need to be signed onto an internet connection somewhere. You'd think anyone who steals a laptop would wipe the hard drive right away (or simply replace it), but then there's a lot of dumb thieves out there.

using commercial software would better in that situation.

supremedesigner
May 29, 2006, 09:42 PM
Um, do you mean by this: http://orbicule.com/products/

I think that will help you instead of doing something crazy! :p

thrustinj
Oct 23, 2007, 10:50 AM
This is available now with iAlertU 0.25b.

Though I haven't gotten the emails to work. I'm going to rewrite the script.

This is the script it uses now. Is there something wrong with it?

on send_email(email_to, email_from)
-- set email_from to "randygreen@comcast.net" --
set image_name to "iAlertU_Capture.jpg"

set image_path to ((path to home folder) as string) & image_name

set image_file to image_path as alias

tell application "Mail"
activate
set new_message to make new outgoing message with properties {subject:"iAlertU"}
tell new_message
-- set visible to true --
set sender to email_from
make new to recipient at end of to recipients with properties {address:email_to}
make new attachment with properties {file name:image_file} at after the last paragraph
-- activate --
end tell
send new_message
end tell

tell application "Finder"
-- delete image_path --
end tell
end send_email