Using rules to automatically save attachments in Apple Mail...

Every time I get an attachment of a certain type from a certain person, I need to automatically save the attachment and run a script on it. Using Apple Mail, I've got the script part worked out, but I still need to automate the saving part... any ideas?

If it is going to be called from Mail rules, it would need to be wrapped properly. Here is the script it came from. You would'nt need the on run handler.
AK
click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">using terms from application "Mail"
on perform mail action with messages theMsges
set theAttachmentPath to (path to desktop) as text
tell application "Mail"
repeat with ThisMessage in theMsges
set Attached to mail attachments of ThisMessage
repeat with ThisAttach in Attached
set FileName to name of ThisAttach
save ThisAttach in theAttachmentPath & (FileName)
end repeat
end repeat
end tell
end perform mail action with messages
end using terms from
using terms from application "Mail"
on run
tell application "Mail" to set sel to selection
tell me to perform mail action with messages (sel)
end run
end using terms from
</pre>

Similar Messages

  • Automatically save attachments in Mail?

    Tried Automator, as well as Rules in Mail, but I can't figure out how to automatically save attachments in emails sent by certain clients. When an email arrives from a client and the email has attachments, I'd like Mail to automatically save any and all attachments to the default downloads folder. Is this possible using either Mail's Rules or Automator? Rules does have an option for running an AppleScript, but I'm no longer up to speed on AppleScript. I'm hoping for a simpler solution.
    Thanks!

    If it is going to be called from Mail rules, it would need to be wrapped properly. Here is the script it came from. You would'nt need the on run handler.
    AK
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">using terms from application "Mail"
    on perform mail action with messages theMsges
    set theAttachmentPath to (path to desktop) as text
    tell application "Mail"
    repeat with ThisMessage in theMsges
    set Attached to mail attachments of ThisMessage
    repeat with ThisAttach in Attached
    set FileName to name of ThisAttach
    save ThisAttach in theAttachmentPath & (FileName)
    end repeat
    end repeat
    end tell
    end perform mail action with messages
    end using terms from
    using terms from application "Mail"
    on run
    tell application "Mail" to set sel to selection
    tell me to perform mail action with messages (sel)
    end run
    end using terms from
    </pre>

  • Attachments to Apple Mails

    There are two issues with attachments to Apple Mail.
    The first is that they don't work. The mere fact that you have to click "Windows friendly" (which is NOT the default) says that they are processed in some way. Apple, please don't process anything. Just attach the file and send it on its way. You can't change the world single-handed. If folks want to use Windows, that is their (big) problem. Disabling them from receiving attachments sent from us who "get it" so that they give some serious thought to their values in life is not the purpose of providing an attachment feature. (Today I logged in to Gmail to send a .doc attachment. Again).
    The second is that Apple does not provide an attachment feature in Mail. It provides an embedding feature. If I wanted to embed stuff in my email, I would look for the command "embed". There isn't one. When I press attach, I don't expect my text, graphics, pdf's and other stuff to appear in-line within my email. I expect them to be ... um, what's the word ... oh yes - attached to my email.
    While I'm there, how about basic formatting in Mail - fonts, italics, bold, bullets and numbering. I know you can make it happen, but how about some press-buttons up top, to make it easy, intuitive and simple? Y'know, Applesque...

    Welcome to the Apple discussions.
    how about basic formatting in Mail - fonts, italics, bold, bullets and numbering.
    When composing an email, you can click on the fonts button to change fonts, bigger/smaller, bold, italics, etc. While in an email, on the mail toolbar, if you click on view and customize toolbar, you can move some other buttons to the toolbar for easier formatting access. Of course you can always highlight something you want to underline and push cmd (apple) U, or cmd B for bold, etc.

  • "Save attachments" button in Mail has disappeared

    My "Save attachments" button in Mail (6.6/1510) disappeared the other day. It has always been there, sitting on the dividing line between message header and message content. But now it's gone. All of a sudden.
    Sure, it becomes visible if I select detailed header info, but it should be there even with the simplified header view. At least it has been up to a few days ago.
    Any tips on how I get it back? It's a bit annoying to select detalied header info each time I want to save attachments. Dragging and dropping is no option for me, since part of what I want is to se a list of all attachments. The "Save" button provides that feature.

    First of all, in the Compose window, click on View and see if Show Toolbar is available as a Command? If so, click on it.
    Ernie

  • Attachments in Apple Mail + Exchange break the text of the mail

    Working with Apple Mail on an Exchange server account, I've recently noted that when I put an attachment in the body of an email, all further text is broken out into a separate email attachment... thereby getting ignored by the recipient.
    This has been happening for a couple of weeks now - and is a significant bug from my point of view.
    The same behaviour is NOT exhibited using my gmail account.
    Any ideas how to fix it?

    Sandlines,
    I should have searched more. I found a posting that talks about this same subject with a method to get it to work. All I had to do was make the first word in the email bold and in-line attachments work the way they are supposed to work. This doesn't help incoming files but it does help make your emails readable.
    Outlook has a tough time rendering an email correctly. If you want it to have all attachments inline (and the server doesn't strip out or prevent use of HTML messages), you can trick it to work. When you start a new message, change the font to something other than your default font. That will trigger Outlook into rendering it correctly.
    Some people create a signature in the Font that they want to compose in, and then start the message in the first line of the signature. That will set the font tag for Outlook to understand.
    If you want the recipients to actually be able to use the image attachments you send, make sure you set the message to Plain Text and put the attachments at the end. Otherwise, Outlook renders the images inline and it is nearly impossible to save them separate from the message.

  • Save and restore Apple Mail settings (Mail version 7.3x)

    Can anyone assist with hints as to how to save/restore the GUI and other individual settings in Apple Mail (Version 7.3, Build 1878.2)?
    In earlier mail version this could easily be done by simply saving & restoring the "apple.mail.pst" file. Thanks.

    Greetings,
    I don't think you would have to use Time Machine at all for this; that would only complicate things. Instead try this:
    Quit Mail if it's running.
    Go to Home/Library/Mail and remove your IMAP mailbox. and any Envelope Index file.
    Restart Mail and wait for the index to rebuild, and with any luck it should download your email again, but only once. If so, then your problem would appear to be solved.

  • Untitled attachments in Apple Mail

    When I send a valid email attachment from my Apple Mail to colleagues using Windows PCs, they sometimes receive an additional file, typically titled either 'Untitled Attachment 000XX.txt' or 'Untitled Attachment 000XX.htm', where XX is a random two-digit number following 3 zeros. These files appear to be empty when opened with TextEdit or Safari, but on at least one occasion, my colleague reports that it contained the full text of another, unrelated email between my colleague and her colleague, from weeks earlier. Any ideas please?
    Mac OS X Yosemite 10.10.1 with Mail 8.1

    HI that is the way many attachments would look in Raw Source...
    Content-Type: image/jpeg; name="image001.jpg"
    Content-Description: image001.jpg
    Content-Disposition: inline; filename="image001.jpg"; size=1823;
        creation-date="Mon, 01 Aug 2011 23:02:12 GMT";
        modification-date="Mon, 01 Aug 2011 23:02:12 GMT"
    Content-ID: <[email protected]>
    Content-Transfer-Encoding: base64
    /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a
    HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy
    MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAApAEoDASIA
    AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA
    AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3
    Only thing that looks strange there is the last part of this...
    application/pdf; name="=?

  • Attachments in Apple Mail scrambled

    When I try to look at attachments (PDFs and Word docs) in Apple Mail they sometimes (but not always) get converted into scrambled text that is embedded at the bottom of the email. Like this....
    ----NEXT_BM_AB726E6E67FB42CBAC2285AF00AF803D
    Content-Type: application/pdf; name="=?iso-8859-1?Q?Travel_Itinerary_-_,1094144.pdf?="
    Content-Transfer-Encoding: base64
    Content-Description: =?iso-8859-1?Q?Travel_Itinerary_-_,1094144.pdf?Content-Disposition: attachment; filename="=?iso-8859-1?Q?_Travel_Itinerary_-,1094144.pdf?="
    Content-ID: <B00E5BC3912B47F89037FC84414DADBD>
    JVBERi0xLjMgCiXi48/TIAoxIDAgb2JqIAo8PCAKL1R5cGUgL0NhdGFsb2cg
    Ci9QYWdlcyAyIDAgUiAKL1BhZ2VNb2RlIC9Vc2VOb25lIAovVmlld2VyUHJl
    ZmVyZW5jZXMgPDwgCi9GaXRXaW5kb3cgdHJ1ZSAKL1BhZ2VMYXlvdXQgL1Np
    bmdsZVBhZ2UgCi9Ob25GdWxsU2NyZWVuUGFnZU1vZGUgL1VzZU5vbmUgCj4+
    IAo+PiAKZW5kb2JqIAo1IDAgb2JqIAo8PCAKL0xlbmd0aCAxNzEzIAovRmls
    dGVyIFsgL0ZsYXRlRGVjb2RlIF0gCj4+IApzdHJlYW0KeJzdWN9T2zgQfs9f
    sY90jriSLMl2ns6EUKA0hcQc0xteTCLA18SmtkOP++tvJdnGSRzo3E3bmxsG
    cFarb3/qWzkUCP5Q/PUCBrOl+Uggv+vZh8m7HvUcX+Cj8KTjQl/r5ap31Ut7
    DE57FL72mHQk9F3CnECA4MzxBPQlcajQmlOEOtU6uJlTqcGWPSED/VALFqjl
    W4lwmcNaGvZzS0EK5pA2RiXQKl96jGtfKANKXSeAvt1UOUy5E0hqQ8ZHjKRR
    ny1xs17wtEDWOy5Q2iVvJELHXAsdJojvGvw+fvACl5sPBtwlTrXEqHky/3Dp
    bbK8IwCHGVq7eAVEPxggs7lx8mKn80bKMNFiXdsNhEkeJUKXiwa+TkOz9SDq
    VXmCRhNThpoROnwDvkMhuu3thXO1iJO5gss0eQPRH2gPFTEEiOa9vTP1qBbA
    97d
    If I look on webmail the attachment is there as a PDF and can be opened and read OK, but on Apple Mail its all messed up.
    What can I do to stop this happening?

    HI that is the way many attachments would look in Raw Source...
    Content-Type: image/jpeg; name="image001.jpg"
    Content-Description: image001.jpg
    Content-Disposition: inline; filename="image001.jpg"; size=1823;
        creation-date="Mon, 01 Aug 2011 23:02:12 GMT";
        modification-date="Mon, 01 Aug 2011 23:02:12 GMT"
    Content-ID: <[email protected]>
    Content-Transfer-Encoding: base64
    /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a
    HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy
    MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAApAEoDASIA
    AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA
    AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3
    Only thing that looks strange there is the last part of this...
    application/pdf; name="=?

  • How do I not automatically download photos in Apple Mail?

    How do I not autmatically download photos when I open Apple Mail. I lve on a boat and internet by the satellite gets expensive. I would like to know how to turn off automatic photo downloads.

    Check with your email provider.  Blocking images is a function they usually can provide.
    Example from Verizon Mail Setup:

  • Blank Emails with Attachments from Apple Mail if received into Gmail IMAP.

    Hi
    I have noticed that if I receive an email with an attachment from someone using Apple Mail to my Gmail IMAP account (in Apple Mail) the body of the text is blank. I get the attachment but the only way to read the body of the email is to show the Raw Source. Has anyone else had the same problem and does anyone have a solution?

    Not me and I use gmail's IMAP service with Apple Mail frequently. You're probably better off posting this question on google's gmail forum which you can get to via the help section on the gmail.com web site.

  • I use gmail and do not want the apple mail program.

    Apple mail keeps popping up.  How do I permanently get rid of it?
    Thanks, Norm

    Do you use Gmail in Apple Mail or online?
    If you use it online and not through Mail, then Mail shouldn't be "popping up" as long it is not open. If it's opening on startup because of the Resume feature you can disable it by going to ~/Library/Containers/com.apple.mail/Data/Library/Saved Application State and deleting that folder.
    Note: To get to ~/Library go to your Finder "Go" menu hold the option key to choose "Library".

  • How do I save attachments out of Mail in Lion?

    I'm set to classic mode and have disabled discussions, but the one bit of old functionality from 10.6 Mail that eludes me is the twirl down arrow (next to the paperclip and under the recipients) that allows me to see all the attachments I've recieved and save them (individually or all together).  Can anyone enlighten me on what preference to alter?  Thanks!

    Yes, but then of course I need to be staring at the useless info for every email - ugh.  It's just another step backwards in usability for me.  There's iOS and there's MacOS; I really hope Apple remembers that it's two different operating systems for two very different operating environments.

  • Attachments in Apple Mail not received by addressee.  Same attachment sent via Google mail received ok.  Why?

    I sometime need to send attachments such as pegs to a Uscg.mil address.  The attachments do not show up to the addressee, and it is probably due to a security firewall on the military side.  However, the same attachment goes through fine if sent using web mail (Gmail).  There must be some difference in the way Apple embeds an attachment that causes it to be rejected by the military security firewall.  Any thoughts on this?

    Did you ever find a solution to your problem sending email with attachments? I am getting the same message  - "please select a different server" when I try to send emails with attachements...VERY FRUSTRATING...!

  • Attachments via Apple Mail

    I've searched and did'nt find an answer to my problem (hopefully I didn't overlook), so I made a post.
    Lately, my clients and recipients haven't been able to receive my attachments when I send using the Mail.app. If I send a PDF or a regular JPG file they're not able to view or download them, but it shows up on my sent folder as a successful transaction.
    How can I fix this, any solutions?
    Thanks.

    Thanks for the quick response...
    I highly doubt it has anything to do with the file size, I use Yahoo Mail via POP3, the PDF I sent was 67KB and the JPG was 1.73MB.

  • Why are attachments in Apple Mail turning into code?

    Dear Support Communities,
    I'm running 10.6.8 on a macbook 4,1 (late 2008). I have had virtually no problems with receiving attachments until this week. In particular, it's happening with someone running 10.8.1. Even PDF files turn to code when I receive them, so they're useless.
    Help is much appreciated!

    I wanted to add that I'm using google mail imap server. The message listing didn't even indicate there was an attachment.
    I just rebuilt the mailbox and at the moment that seems to have worked (although having read through another thread I'm a bit dubious of whether that will stick).

Maybe you are looking for

  • Crystal Reports for Eclipse 2.0 - Service Pack 1 - is Now Available!

    Service Pack 1 for Crystal Reports for Eclipse 2.0 is now available! Readme file listing the fixes is here: [http://downloads.businessobjects.com/akdlm/crystalreportsforeclipse/2_0/cr4ev2_readme.pdf] Kirby Leong in another post listed the download UR

  • How to restrict the decimal entry on dynamic table in adf 11 .6

    Hi All,   JDev version 11.6   I have a usecase based on dynamic VO. How to restrict the decimal numbers on table columns . When user enter the decimal number .I have to show error message.   In order to achieve above requirement .I have added value c

  • How do i get my music off phone and into iTunes library

    I am trying to save music that I have on my phone to itunes account.  These are all purchases and I have an iMac.

  • Kernal patch problem

    Hi, When i try to start Application server, command line becomes yellow color while sarting ABAP instance and it says "Start Operation time out". The following file shows  C:DOCUME1vimalrajLOCALS1TempWER638b.dir00appcompat.txt below error. It seems k

  • OS X Yosemite or Mavericks-Which is better?

    Hello, everyone, I want a professional, personal, and meaningful review of OS X Yosemite's new design/UI and the new features. Thank you!