Mail Rule Applescript to Forward Email Attachments Only

Hi Everyone,
I'm running 10.8.4 and Mail 6.5. Using Mail Rules, I'd like to forward emails containing attachments but not the message content (contained in the email to be forwarded). I am not an AppleScriptor but have tried to write code...with no luck. Does anyone know of such a script that can be activated using Mail Rules? Or propose a script I could use?

Hi Everyone,
I'm running 10.8.4 and Mail 6.5. Using Mail Rules, I'd like to forward emails containing attachments but not the message content (contained in the email to be forwarded). I am not an AppleScriptor but have tried to write code...with no luck. Does anyone know of such a script that can be activated using Mail Rules? Or propose a script I could use?

Similar Messages

  • How to block email attachments only from a specific domain?

    Using C370 CISCO IronPort How do I block email attachments only from a specific domain?

    Hi Daniel,
    In order to achieve this, you have three options:
    1. Using a new Incoming Mail Policy
    - Create a new Incoming Mail Policy and define that domain as sender in policy members.
    - Then create an Incoming Content Filter with a condition to match specific file info (for example: filetype, name, size, mime type, etc.)
    - Define an action (quarantine, bounce, drop, etc.)
    - Enable this filter in newly created Incoming Mail Policy
    2. Using existing Incoming Mail policies
    - Create a new Incoming Content Filter with condition to match sender address containing that domain.
    - Add another condition to match specific file info (for example: filetype, name, size, mime type, etc.)
    - Use "Apply Rule" as "Only if all conditions match"
    - Define an action (quarantine, bounce, drop, etc.)
    - Enable this Content Filter in all Incoming Mail Policies.
    3. Using Message Filters
    - From CLI -> filters add a new message filter like below:
    block_attchment_example_com:
    if (mail-from == "(?i)example.com$")
        if (attachment-filetype == "exe")
            drop();
    - Please replace the mail-from domain with the actual domain.
    If you wish to block all attachments, you can chose attachment size rule in all of above three options with a really smaller attachment size, this will result in matching messages that has an attachment.
    Hope this will help.
    Rehan

  • Mail doesn't display full email text, only displays the subject line

    Mail doesn't display full email text, only displays the subject line.
    My preview shows first three lines of email, but when I chose the email specifically mail doesn't display any lines of text.  Been this way for about ten days.  Please help.  Ben

    Awesome.  Rebooting the phone worked.  I had never turned the phone off before (for the next guy - you hold down the "sleep" button for longer than you'd think and that'll do a full shutdown).  thank you for your help.

  • Mail rules , why go forward mail in addition to Annex

    Mail rules , why go forward mail in addition to Annex

    我用郵件規則,把指定Mail轉發到指定Mail,但附件就失蹤了!怎麼辦?

  • Problem When Forwarding Email Attachments / Email With Attachments

    I posted a response in a related thread that describes my problem, but have found no solution so I thought I should create a new thread and solicit direct advice for this issue.
    I sync 2 (sometimes 3) Yahoo Email accounts to my iPhone 4. Due to firewall issues at work accessing 'personal email', I often email myself files as attachments, then forward them to others using my iPhone. Having recently upgraded from iPhone 3G to 4, now when I forward an email with attachments, the attachments get zapped to 0B and effectively do not forward. It may show an icon or have the file, but it's an empty file. I always select "Include Attachments" when it asks, but the functionality is not working the way it is supposed to.
    I've tried forwarding .xls .doc and .zip files so far. Even a small 180kB file won't forward.
    The only exception seems to be if I click the attachment, let it fully download, then forward the email. That works for 'standard' types of files, but I didnt have to do this step in the previous iOS, so I am wondering - Is that normal now?
    What about other types of files besides office and adobe? If the iPhone doesn't have support for me to view the file on my phone, I can't "download" it before forwarding. Example is a zip file. It shows as a "?" in my email, so I cant download it, so when I forward it it kills the attachment.
    Regardless what the phone supports to view, if I just want to forward an email from the server along to someone else, it should have the freakin' attachments! This doesn't seem to be the case for all situations though.
    Would seriously appreciate a confirmation others have this issue (go ahead, try to send yourself a zip file and then just forward it back to your PC) and any solutions that might explain how to correct this problem. Maybe there's a server setting or another way of setting up the email accounts that would fix it.
    Thanks all

    Being able to forward as an attachment would be such a useful feature. Forward as in-line text works but this is no good if you want to retain the original email headers or smime content.
    One prime example is the use of SpamCop.net where you need to be able to send the original mail (including headers) for SPAM processing. Forward as attachment is the easiest way to do this.
    Come on Apple, please help us, without the "Forward as Attachment" it make it difficult for us to quickly report SPAM or forward documents. Can it really be that hard to implement?
    Vote... Vote...

  • 8900 Curve - Forwarding email attachments

    I am currently experiencing problems forwarding emails with attachments - If I receive an email with attachments and wish to forward to another email address, the recipient only receives the main body of the email - not the attachments - I can open the attachments on my handset without any problems
    Anyone any ideas??

    Hi there!
    I suggest the following steps, in order, even if they seem redundant to what you have already tried (steps 1 and 2 each should result in a message coming to your BB):
    1) Register HRT
    Homescreen > Options > Advanced Options > Host Routing Table > (it does not matter which line is current) > Register Now
    2) Resend Service Books
    KB02830 Send the service books for the BlackBerry Internet Service
    3) Batt Pull Reboot
    Anytime random strange behavior or sluggishness creeps in, the first thing to do is a battery pop reboot. With power ON, remove the back cover and pull out the battery. Wait about a minute then replace the battery and cover. Power up and wait patiently through the long reboot -- ~5 minutes. See if things have returned to good operation. Like all computing devices, BB's suffer from memory leaks and such...with a hard reboot being the best cure.
    Hopefully that will get things going again for you! If not, then you should try deleting and re-adding your BIS conduits for the affected email accounts.
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Need AppleScript to Forward Email to Specific Person

    I need an AppleScript to forward the selected message to a specific e-mail address. I want to be able to insert a comment in the message area at the top of the message thread—just as if I were doing it manually.
    I have a script that creates a new message and copies the contents of the selected message to it. However, I lose all the formatting.
    Can someone help me? Thanks.

    I'm using this paste technique to do a mail forwarding like OP but I'm using the second last paragraph of the email set to a variable as the comment text.
    Watching it loop thru the messages I can see the text gets pasted for a moment and then deleted. The script delays for 1 second then does the next email. I'm not sending them just composing them in Mail.
    What could be cuasing the comment text to disappear. Sometimes it stays mostly it gets deleted.
    tell application "Mail"
              try
                        set notes to {""}
                        set email_selection to (get selection)
                        repeat with a_msg in email_selection
                                  set theText to content of a_msg
                                  set their_name to words 2 thru -1 of paragraph 9 of theText
                                  set comments to paragraph -5 of theText
                                  set subscriber to paragraph 5 of theText
                                  if comments ≠ "comments: " then
                                            set comments_LF to (comments as rich text) & return
      set the clipboard to comments as rich text
                                            copy {subscriber, comments as rich text} to the end of notes
                                            set the_forwarded_message to forward a_msg with opening window
                                            tell the_forwarded_message
                                                      make new to recipient at end of to recipients with properties {name:"Alastair Leith", address:"[email protected]"}
                                                      set subject to (their_name as rich text) & " has a comment on subscription form"
      activate
                                                      tell application "System Events" to keystroke "v" using {command down}
                                                      delay 0.1
                                            end tell
                                  end if
                                  tell application "AppleScript Editor"
      -- display dialog (notes as text)
                                  end tell
                        end repeat
      -- display dialog (notes as rich text)
                        return notes
      -- display dialog notes
              on error the error_message number the error_number
                        tell application "AppleScript Editor"
                                  display dialog "Error: " & the error_number & ". " & the error_message buttons {"OK"} default button 1
                        end tell
              end try
    end tell

  • I can no longer select multiple addresses from my Mail address book when forwarding emails

    Since updating to Mavericks I cannot select multiple addresses from my address book when forwarding emails.
    I can select them individually using the + sign in the address bar but cannot select any when I open my Contact list as I have done with previous systems.
    Additionly, the full address appears in the "To" window instead of just the name and without the email address. I have selected "Smart Address" from the Preferences menu, View section.
    Help!

    Why are you using a Hotmail or Live Mail SMTP server to send email with your Gmail account?
    This is likely the cause of the problem. Use Gmail's authenticated SMTP server to send email with your Gmail account.

  • Mail Header in Reply/Forwarded Email

    In Mail, is it possible to show the full header (from, date, subject, to) rather than an abbreviated quote in replies and forwarded email?

    exactly so.
    in general, for any configutil setting:
    0=off=no
    1=yes=on

  • User Mail filter refuse to forward emails

    Hi all,
    I use the Messaging server with Calendar and SSO with AM. I have The Messaging server version:
    Sun Java(tm) System Messaging Server 6.2-4.03 (built Sep 22 2005)
    libimta.so 6.2-4.03 (built 04:37:42, Sep 22 2005)
    All others type of filters I tested works, except when I create a rule to forward incoming email based on specific keywords (subject or sender doesn't matter).
    I always get the email and another one with the subject: "Problem during delivery processing"
    and the body:
    Processing errors occurred during delivery:
    Recipient address: [email protected]
    Reason: Error in sieve filter: Too many notifys specified
    Delivery processing continued in spite of these errors.
    The problem is I just put one email in the "forward email to:" field and the forward is not executed even if stating the delivery processing continued.
    I don't see the forwarded email "stuck" in any queue. (imsimta qm)
    I did the "imsimta test -rewrite -filter -debug [email protected]" but unfortunatly I can't make much of the listing of infos...
    Any ideas ?
    Thanks,
    Phil

    Hi Shane
    Hi Phil,
    Are you saying that you created a new rule for a
    different account on the same server and it now
    works, or a different server?
    Sorry for the confusion: I create a filter rule to forward specific emails in users accounts (using the gui of uwc) and every time I do, it doesn't work. On all servers I installed soo far.
    I would be looking at:
    - software release differences (messaging server) if
    the accounts are on different systems.
    - differences in the rules themselves (imsimta test
    -rewrite -debug <address> will display towards the
    end the rules as were retrieved from the directory
    and the rules in the order which they are evaluated.
    The second rule listing display is most useful)
    Since you can retrieve the rule, you can see what
    rule matched by doing the following:
    imsimta test -exp -mm -block -input=test.filter
    -message=rfc822.msg
    -> test.filter is the sieve filter rules for the
    user
    -> rfc822.msg is an example email that isn't
    matched.When I do that, everything is ok if the rule doesn't match, and when it matches, I have the same error message (previous post) that I have by email. Here's the whole thing:
    bash-3.00# ./imsimta test -exp -mm -block -input=phil.filter -message=mess.msg
    Expression: #RULE: $Name="for" $Order=1 $Type="DEFAULT_TYPE"
    Expression: Expression: require "notify";
    Expression: Expression: require "variables";
    Expression: Expression: #BEGINFILTER
    Expression: Expression: if allof(allof(header :contains ["Subject"," Comments"," Keywords"] "check"),anyof(allof(not header :matches ["Subject"," Comments"," Keywords"] ["POSTMASTER-AUTO-FW:*","postmaster-auto-fw:*"],header :matches ["Subject"," Comments"," Keywords"] "*"),true)){
    Expression: Expression: notify :method "email" :echo :options "[email protected]" "POSTMASTER-AUTO-FW:${1}" "This is an auto-forwarded message";
    Expression: Expression: stop;
    Expression: Expression: }
    Expression: Expression: #ENDFILTER
    Expression: Expression:
    Expression: Dump: (allof):1000002;0 2 18 (allof):1000002;0 1 15 header:2000115;0
    Dump: 3 1 :contains 8 "Subject" list " Comments" list , "
    Dump: Keywords" list , 1 "check" 44 (anyof):1000004;0 2 39
    Dump: (allof):1000002;0 2 20 header:2000115;0 3 1 :matches 8
    Dump: "Subject" list " Comments" list , " Keywords" list , 5
    Dump: "POSTMASTER-AUTO-FW:*" list "postmaster-auto-fw:*" list ,
    Dump: ! 15 header:2000115;0 3 1 :matches 8 "Subject" list "
    Dump: Comments" list , " Keywords" list , 1 "*" 1 1 if 20
    Dump: ; notify:2000121;0 7 1 :method 1 "email" 1 :echo 1 :options
    Dump: 1 "[email protected]" 1 "POSTMASTER-AUTO-FW:${1}" 1
    Dump: "This is an auto-forwarded message" ; "" stop
    Evaluation error: Too many notifys specified
    As you can see, there is just one specified notify and did use the gui of uwc.
    It could be the problem is as simple as an earlier
    rule is being matched and the forward rule doesn't
    get hit.I tested on different users, even on a server with just one user and one rule.
    Thanks for the help so far, and the infos on how to check filter rules ;)
    Phil

  • Forwarding email attachments

    why can't I forward picture attachments that opened fine when I received the email?

    I'm using my local internet provider email. Before getting the MAC, this was never a problem. They are being sent from computer to computer and I really don't know what each of recipients use. It's never been an issue before. When I forward to myself, it doesn't work, which is how I figured out it wasn't working in the first place. Also, when I send an email with an attachment, the finishing message reads, "message sent successfully" with "attachment" When I try to forward, it doesn't even see the attachment. I'm not sure what "redirecting" means...sorry. Thanks for any help you can give. This is getting frustrating.

  • Do email attachments only get downloaded when opening the message...

    ....or are they downloaded when the mail is retrieved/fetched?
    thanks!

    You're welcome.
    As a test, have you tried sending an email to yourself with a fairly large photo attachment - a photo much larger in size than 100KB or so for example. With wi-fi turned off, download the email when connected to AT&T's network. If the attachment is fairly small in size, it may download with the message. A larger attachment should require selecting the attachment to download it separately. I'm not sure what the designated size of an attachment that requires this, but having to download an attachment separately when connected to AT&T's network - especially with a larger attachment or when there are multiple attachments has been my experience.

  • IPhone 4s Mail shows over 5000 unread emails, but only 4 show up in Inbox

    On my wife's iPhone 4s, running the latest iOS, Mail shows over 5000 unread messages, but there are actually only 4 in the Inbox.  Anyone out there who has experienced this and have a fix?

    You need to log into your email on a browser and delete them from there.

  • Mail v7.2 rule doesn't forward received emails

    I am attempting to write a Mail rule to automatically forward all emails I receive from our HOA to my wife.  I am able to creat rules that correctly intercept emails from our HOA and move them to seperate mailboxes, but I am unable to forward emails either as a second step in a mail rule or as a stand alone rule.

    This doesn't work for me.  I can get a rule to correctly identify a received email from a specified source, but I cannot get a rule to forward the email.  I have written test rules that moves an email to a specified mailbox so I know the correct identification of incoming emails  and the 2nd action is working, but when I then attempt to change the test rule so that the 2nd function forwards the email and that does not work.
    Arthur

  • How do I include attachment when forwarding Mail Rule is applied?

    I figured out how to forward an email using mail rules.  If that email has an attachment how do I include the attachment with the email?

    No, Redirest also does not work - attachments are left behind.
    Another thread is reporting a third party solution (thanks for nothing Apple!)
    https://discussions.apple.com/thread/3232716?start=45&tstart=0
    using Tamer: http://download.cnet.com/Attachment-Tamer/3000-2367_4-56076.html#rateit

Maybe you are looking for

  • Cannot burn CDs after upgrade to iTunes 6.0.1.3

    I Can no longer burn CDs - Always get "unknown error 2122" Have updated: - optical drive firmware - audio driver - display adapter driver - Intel chipset software - CMOS BIOS Tried but cannot access update for my motherboard's ATA bus driver iTunes C

  • ITunes 11.1.4 Question

    After downloading the latest update to iTunes (11.1.4), you should now have the ability to see your wish list while viewing your iTunes Library. Unfortunately, I am missing something here. I can't view my wish list unless I am in the iTune Store. Tho

  • I'm not receiving verification emails

    I've downloaded the creative cloud and It's telling me that I need to verify my email and it won't allow me to continue without varification. However when I press "Resend" I get nothing in my gmail inbox. I need Adobe Premiere promptly for an assignm

  • MacBook Pro Life Span?

    The very new MacBook Pro has a built in battery that is to last 1000 charges at an 8 hour usage per charge. If one is used and recharged everyday, that mean the computer is useless after about 125 days. With no way to replace the battery, there goes

  • CS2 Activation Error

    Hello everyone, I recently bought a used copy of CS2. It came in the retail box and the CD still had the seal on it. It looked very legit (not that it always means anything, I guess), but when I try to install it I get the message that an activation