Apple Mail – Attach Multiple Items?

Is there a way to attach multiple files to the Mail Action? I will save the URL of files as a Variable..... please see the image attached.

Hey Ali,

The Create new mail message action only allows 1 file attachment.

If you need to attach more than 1 file you’re probably going to have to resort to AppleScript.

Here’s an example:

# Auth: Christopher Stone
# dCre: 2013/05/15 06:11
# dMod: 2016/02/04 23:46
# Appl: Apple Mail
# Task: Make a new outgoing message.
# Libs: None
# Osax: None
# Tags: @Applescript, @Mail, @Make, @New, @Outgoing, @Message

set attachmentList to {alias "Mercury:Users:someone:Documents:Keyboard Maestro Stuff:Exported Macros:ACME Telephone Number Look-Up.kmmacros", alias "Mercury:Users:someone:Documents:Keyboard Maestro Stuff:Exported Macros:FrogScript.kmmacros"}

set toName to "Robert A. Heinlein"
set toAddress to ""
set _sender to "H. Beam Piper <>"
set _subject to "Test Message"
set _body to "Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal."

tell application "Mail"
  set _msg to make new outgoing message with properties {subject:_subject, content:_body & return & return}
  tell _msg
    set visible to true
    make new to recipient at end of to recipients with properties {name:toName, address:toAddress}
    set sender to _sender
    repeat with theAttachment in attachmentList
      make new attachment with properties {file name:theAttachment} at after the last paragraph
    end repeat
  end tell
end tell



Hi Chris,

Thank you for your response, if possible please could we log this as a feature request in KM. Maybe in the future KM would allow multiple files to be attached.

I am much obliged for your assistance.

Yours sincerely,

Mr Ali Demirtaş

CC: Mr Peter N Lewis

1 Like

Its unlikely I’ll expand support to allow for multiple attachments - the UI and code to do it simply is not likely to be worth the effort for the few cases where it is useful, especially when there are alternative solutions available.