• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mail attachments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail attachments


  • Subject: Re: Mail attachments
  • From: Christopher Stone <email@hidden>
  • Date: Wed, 30 Dec 2015 15:17:45 -0600

On Dec 30, 2015, at 09:28, Yvan KOENIG <email@hidden> wrote:
I'm getting a puzzling behavior.
…
But, from time to time, and I don't understand why, although the first message selected has attachment(s), the instruction trying to get them fails…

The attachments for which I got this odd behavior are PDF and/or JPG files of around 300,000 bytes which is not a huge size.

I have no example of such behavior for messages received thru my .mac.com account but most of the messages received thru this one behave flawlessly.
______________________________________________________________________

Hey Yvan,

I sent a 455K jpg file to my own iCloud account, and I replicated your issue.

The error message I get is: “Mail got an error: AppleEvent handler failed.”

That's the same error I get when I run:

tell application "Mail"
  tell (some message viewer whose index is 1)
    set preview pane is visible to false
  end tell
end tell

I used send-again to send this very same message to one of my normal POP accounts.

My version of your script works fine on that message.

tell application "Mail"
  set selectedMessageList to the selection

  if length of selectedMessageList = 1 then

    set theMessage to item 1 of selectedMessageList
    tell theMessage to set messageAttachmentList to its mail attachments
  else
    beep
  end if

end tell


I conclude this is a BUG.

I see no direct workaround using Mail itself.  (You can of course resend the message to a different account and rerun the extract script.)

I bet there's a Perl library out there that makes short work of extracting things from email message source, and this might also be possible with ASObjC (Shane?)

But I think the issue needs to be filed as a big hairy BUG.

A little extra testing:

I zipped the jpg (382K) and sent it to my iCloud account – this time the extract script worked.

I duplicated the jpg, zipped it and the original, and sent the larger zip file (765K) to my iCloud account.  The extract script worked on this message as well.

I'm thinking the issue is related to files Mail displays in-line, but that is currently just conjecture.

--
Take Care,
Chris

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Mail attachments (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Mail attachments
  • Next by Date: Re: Mail attachments
  • Previous by thread: Re: Mail attachments
  • Next by thread: Rép: Mail attachments
  • Index(es):
    • Date
    • Thread