Mail attachment and el capitan

Posted on
Mon Oct 19, 2015 9:44 am
Jaska offline
Posts: 12
Joined: Oct 21, 2014

Mail attachment and el capitan

Hi all,

Can anyone help me?
I have a apple script, that send security camera picture.
it worked really well before, but after i updated to el capitan
it sends email without attachment. No errors, it just wont send the picture.

Code: Select all
do shell script "curl -f 'http://admin:passwords@192.168.100.xxx/image/jpeg.cgi' -o ~/Desktop/IPCam/picture.jpg"
delay 1

tell application "Mail"
   set theSubject to "picture" -- the subject
   set theContent to "some picture" -- the content
   set theAddress to "someone@someone.com" -- the receiver
   set theSignatureName to "someone" -- the signature name
   set theAttachmentFile to "OSX:Users:Mac_mini:Desktop:IPCam:picture.jpg" -- the attachment path
   set msg to make new outgoing message with properties {sender:"<someone@someone.com>", visible:true, subject:theSubject, content:theContent}
   tell msg to make new to recipient at end of every to recipient with properties {address:theAddress}
   tell msg to make new attachment with properties {file name:theAttachmentFile as alias}
   send msg
end tell

Posted on
Fri Oct 23, 2015 12:15 pm
Fordy offline
Posts: 28
Joined: May 31, 2014
Location: Winchester, UK

Re: Mail attachment and el capitan

Hmm I have the same problem. My script is similar to yours (not the same, but does the same thing when the doorbell is pressed!) - and it stopped working when I updated to el captain.

googling around a few other non indigodomo users have the same issue with attachments disappearing from apple scripts!

It seems Apple may have broke this in the recent El Capitan update.... :)

Posted on
Sun Dec 06, 2015 6:37 pm
richo offline
Posts: 158
Joined: Nov 25, 2014
Location: Pomorskie, Poland

Re: Mail attachment and el capitan

There is a workaround - add small delay (1 second) before send msg - it has worked for me after struggling for a couple of days after upgrading to El Capitan.

Ryszard

Posted on
Mon Dec 21, 2015 3:12 pm
Jaska offline
Posts: 12
Joined: Oct 21, 2014

Re: Mail attachment and el capitan

It works .
Thank you very much.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 9 guests