I have this Applescript that when it runs, it is suppose to grab an image with a set name from a set location, create a new email in Entourage, place a subject line, place the image as an attachment, use my email address a the to:, and send it off to me..
currently, I only have it correctly creating the email, adding the subject line. BUT it does not attach the image, use my email address, send it off. it just puts this half finished email into the Drafts folder.. better progress than expected... but
where are my errors?
on send_email(email_to) ---
-- set email_to to someoneisomeplace.net--"
-- set email_from to someonessomeplacek.net--"
set image_name to "Defaultt.jpg"
set image_path to ((path to home folder) as string) & image_name
set image_file to image_path as alias
tell application "Microsoft Entourage"
activate
set new_message to make new outgoing message with properties {subject:"Here is your proof!"}
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 {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
currently, I only have it correctly creating the email, adding the subject line. BUT it does not attach the image, use my email address, send it off. it just puts this half finished email into the Drafts folder.. better progress than expected... but
where are my errors?
on send_email(email_to) ---
-- set email_to to someoneisomeplace.net--"
-- set email_from to someonessomeplacek.net--"
set image_name to "Defaultt.jpg"
set image_path to ((path to home folder) as string) & image_name
set image_file to image_path as alias
tell application "Microsoft Entourage"
activate
set new_message to make new outgoing message with properties {subject:"Here is your proof!"}
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 {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