Applescript rule to print Mail?

I've been looking around the web trying to find out if there is a way to use Applescript to print out emails without writing to a temporary file and doing a shell script.
Can it be done? Is automator a better choice.
OS X 10.4.8 ad Mail 2.1

Still haven't found any other solution than to use a shell script and temporary file. Is this just a shortcoming of OS X Mail's Applescript capabilities?
Simply, based on some rules in Mail, I just want to print messages to a network printer via a script.
No go?

Similar Messages

  • Why is the applescript action in a mail rule always pushed last?

    Hi,
    I try to create a rule in Mail such that an Applescript is executed and then other things are done to the message (such as move it to a folder, for example). I want this to be the preceise order of things: first, do script, next, do other things.
    I create my rule in the Mail preferences, and it all goes fine. But when I reopne the rule to examine it again, I see that the Applescript part of the actions has now been pushed to the end of the action list.
    I wonder if anyone can explain the logic of this? I didn't find any reference in the help for why is this happening. Is it because of the possible time-out associated with the applescript (so as not to hang the rest of the rule evaluation)?
    Thanks for any insights.
    -- ivan
    PM DC 2Ghz G5, PB 1.5GHz G4   Mac OS X (10.4.5)  

    I don't know exactly but it might be that Mail has no way of knowing that the Applescript has completed in order to continue. So, making it the last step ensures that the complete rules will work everytime.
    What are you trying to do with your messages? Perhaps we can figure out a workaround.
    Bronson

  • Applescript rule for auto-archiving Apple Mail 3.0?

    In Tiger, I used an Applescript rule that someone had wrote which automatically moved all incoming mail that wasn't junk, into an, 'ON MY MAC Mailbox', named 'Inbox Archive', and all sent emails into an 'ON MY MAC Mailbox' called 'Sent Archive'
    This was a great way to keep my inbox clean, while always having an archive of all emails I've sent & received.
    The script doesn't work in Leopard, and causes Mail to crash. Unfortunately I no longer have the author's contact info, and don't know of as easy & clean a method to keep an archive. I'm not interested in a 3rd party app. Does anyone know if Mail 3.0 has an Archive feature? Or anyone who can Applescript such a rule?
    Thanks!

    Thanks TexasZeus. Unfortunately his Mail Scripts aren't Leopard ready, but the link does help expand my resources, so thank you!
    http://homepage.mac.com/aamann/Mail_Scripts.html

  • Applescript to trigger a Mail Rule

    I'm trying to do something I thought would be simple ... but I can't figure it out.
    My goal is to get specific messages from one mailbox and put them into my Inbox. I've used a rule with a MailTags deadline to get the messages into the box, and I have created a rule to move mail with a deadline of today or earlier back to the Inbox. I would like to automatically apply the "move to inbox" rule to the contents of the other mailbox, so I can have iCal move my messages every morning.
    I am not very good at scripting, and I can't figure out how to write a script to apply the move to inbox rule to every message in the other mailbox. Can someone help me or point the way to a script that I can adapt? Everything I've found works the other way (using a rule to call a script — I want a script to call a rule).
    Or, is there a better, easier way to do this? It is important that the process can be set to run automatically. This whole thing is to get messages that are "on hold" out of my inbox until the time when I can deal with them. If they don't come back automatically, I'll forget about them.
    I did try using a SmartFolder — but creating a SmartFolder that works off MailTags rules makes my system slow to a crawl, and the badge counts are all off.
    Thanks in advance

    I'm trying to do something I thought would be simple ... but I can't figure it out.
    My goal is to get specific messages from one mailbox and put them into my Inbox. I've used a rule with a MailTags deadline to get the messages into the box, and I have created a rule to move mail with a deadline of today or earlier back to the Inbox. I would like to automatically apply the "move to inbox" rule to the contents of the other mailbox, so I can have iCal move my messages every morning.
    I am not very good at scripting, and I can't figure out how to write a script to apply the move to inbox rule to every message in the other mailbox. Can someone help me or point the way to a script that I can adapt? Everything I've found works the other way (using a rule to call a script — I want a script to call a rule).
    Or, is there a better, easier way to do this? It is important that the process can be set to run automatically. This whole thing is to get messages that are "on hold" out of my inbox until the time when I can deal with them. If they don't come back automatically, I'll forget about them.
    I did try using a SmartFolder — but creating a SmartFolder that works off MailTags rules makes my system slow to a crawl, and the badge counts are all off.
    Thanks in advance

  • Mavericks 10.9.3.  Can I write a Rule in the Mail app and tell the rule to return an email to the sender?  I have already trsuggestions?

    Mavericks 10.9.3.   MacBook. Can I write a Rule in the Mail app to return an email to Sender?  I have tried many, many times but no luck so far.  Is it even possible, or am I wasting my time?

    There is no specific option to do that, although you can redirect a message if it meets certain criteria. I believe if you wanted to bounce it back to the sender, then you would need an AppleScript to run. If you do some Google or MacUpdate searching you may find an existing script for this purpose.

  • Print Mailing Labels from Address Book

    After following the convoluted rules for Address Book, I finally got my Leopard computer to print Mailing Labels with proper relationships displayed. I upgraded to Snow Leopard and now this is all broken again.
    I read http://support.apple.com/kb/HT3952 which describes the changes made to Snow Leopard, however for anyone who already put in a lot of work to get labels working correctly for Leopard (or Tiger), this is a major set back.
    Not only that, the Snow Leopard method for printing labels breaks so many other uses of Address Book. I will name a few:
    iPhone:
    I sync my address book with my iPhone. My buddy calls, now instead of "Bob Smith" displayed on my iPhone, I will see "Bob & Jean Smith" even though the call is from Bob's cell phone....all because I followed the new 10.6 rules to get proper labels printed by 'hacking' the first name field and changing "Bob" to "Bob & Jean".
    Mail:
    When I receive and email from Bob, instead of it saying "Bob Smith <[email protected]>" it will display: "Bob & Jean Smith <[email protected]>"
    I'm sure there are other examples of how this change will break other apps.
    Solution:
    Apple should add a Print option to Address Book with a backwards compatibility checkbox that will include relationships with matching addresses to support 10.4 - 10.5.8 address book printing usage.
    If you agree that Apple should add this Print option to add back support for relationship printing, add your voice to this thread, as well as post a bug report to Apple with similar contents.

    A vote here for a checkbox in preferences to "include related names," allowing for 10.5 style behavior.

  • Automator/applescript to forward junk mail as attachment...how?

    I finally came up with a real use for Automator and Applescript -- I was delighted.
    I want to modify my junk mail rule to run an Applescript that forwards a mail message as an attachment (not just a regular forward) to Spamcop.
    It has to be forwarded as an attachment. First shot, I simply went to modify my junk mail rule but, alas, found that "forward as attachment" is not an option for Mail's rules. Fortunately, there is a "run Applescript" option so...
    I fired up Automator, hoping to see how to tell Mail to forward a message as an attachment. Again, alas, no "as attachment" option there. So then I started exploring how to invoke the Mail menu item Message > Forward as Attachment but, haven't been able to figure it out.
    Any help would be appreciated. Especially since this will be the first time I've actually found a use for Automator, which is great... I just know it's not merely eye candy...

    Here is some starter code, to be saved into the current users' '~/Library/Scripts/Applications/Mail/' folder - as a script file ...
    using terms from application "Mail"
    on perform mail action with messages tMessages
    repeat with i in tMessages -- Cycle throught the list of incoming 'Rule' filtered e-Mail messages.
    -- File path file Name of temporary attachement file.
    set file_Name to (((path to home folder from user domain) as string) & (do shell script "date +%Y%m%d%H%M%StempFile.txt"))
    try -- Capture any unexpected AppleScript error.
    set FREF to open for access file file_Name with write permission -- Create temporary attachement file.
    write ((source of i) as string) to FREF starting at 0 -- Write to temporary attachement file.
    close access FREF -- Close temporary attachement file.
    -- Make new outgoing e-Mail message, and attach respective attachment file.
    set tMessage to make new outgoing message with properties {visible:true, subject:"My Subject", content:("My Body" & return & return)}
    tell content of tMessage
    make new attachment with properties {file name:(file_Name as alias)} at after last paragraph
    end tell
    end try
    try -- Capture any unexpected AppleScript error.
    tell application "Finder" to delete file file_Name -- Trash temporary attachement file.
    end try
    end repeat
    end perform mail action with messages
    try -- Capture any unexpected AppleScript error.
    tell application "Finder" to empty trash -- Delete all temporary attachement files (plus all other items) in the trash can.
    end try
    end using terms from

  • I want to print mail from my ipad

    Where is the "action icon" to print mail from an ipad? I have the HP envy compatible printer.

    If you are using the mail app, tap the curved arrow at the top of the message window to bring up the print option.

  • Can Pages Print Mailing Labels?

    I have a number of clients that currently use mail merge on their PC's in Office 2003 to print mailing labels. Their biggest issue has been getting this to work painless, as theres always some sort of file compatibility issue or what they see on the screen is not what they get in print form.
    Can Pages do a 'mail merge' or similar to print mailing labels easily? Is there any way to print mailing labels from an address book stored on the Mac? If so do you need to manually enter label sizes or is there a list of compatible brand labels (such as Avery) like Word has?
    A few of my clients would consider switching over to a Mac if daily tasks like this were more painless then using Office on a PC. You would think after all these years someone would be able to make this simpler.
    PowerMac G3   Mac OS X (10.4.8)  

    Welcome to Apple Discussions
    Pages 2 can do mail merge using data in Address Book, but it appears to be intended to use in form letters & envelopes & prints one record per page not for printing a page of labels.
    But, there is no need to use Pages for the labels. Address Book in Tiger will print labels directly. There are several printing options in the Print dialog - labels, envelopes, lists or pocket address book.

  • Printing Mail message page numbers

    Wehn I print a multiple page message that I have received, the pages are not numbered.
    How do I tell the printer to put page numbers on the message?

    Since Mail (nor any other mail program I've ever used
    or heard of) has this feature, you can't get page
    numbers on your email.
    I beg to differ. Eudora prints page numbers and summarizes who the mail is from on each page. This is a desireable feature.
    If you don't want to print mail that is your privilege, those of us who do want to print would like to have the option to see page numbers.
    Eudora also gives you the option of displaying the local time when a message was sent, not only the time you download it.

  • Print Mail PDF Email client

    I just recently installed the new Office MAC 2008 (my problems seems to happen with any application) and decided to use the new Entourage as my default email client. When I'm in any application and go to Print>mail PDF a file my non-default (originally)email client keeps activating. How do I change my default email client to work when I Print>Mail PDF from within an application. Thanks Chris

    The other way to configure this is to select the "Edit Menu..." item in the print dialog's PDF button/menu. A utility window will appear. You can add new items by hitting the plus button in the lower left of that window. His the plus button and then pick Entourage. This will add the alias to the PDF Services folder for you.

  • Is there a setting in Contacts so I can I print mailing labels with just the last name of my contacts?

    I'd like to print mailing labels that just show the person's last name, no first names.  For example just "Smith," not John Smith.  Is there a way to do this? 

    I'd like to print mailing labels that just show the person's last name, no first names.  For example just "Smith," not John Smith.  Is there a way to do this? 

  • Print Mailing Labels with company name?

    I haven't been able to print mailing labels that include the individual's name fields AND company name field above the street address. Any advice? is this even possible?
    J

    S-
    Thanks for the link- I looked into it and found that in case you've opted to include a company name but there is none for a particular contact, pearLabelizer seems to leave a blank space for that line, which isn't particularly great either. I'll keep playing around with it and let you know if it works.
    Gracias,
    J

  • Rules set in mail are suddenly not working?

    I had my rules set in mail and now they are suddenly not working, what to do to fix?

    I'm having the same problem, but not with all messages. Only a few slip through. However, when I right-click and Apply Rules to individual emails, the rule suddenly works.
    What I'd like to work (and it doesn't), is to be able to select-all emails in inbox and then right-click, Apply Rules. But this never works. AND it'd be must faster than doing it individually. Thx!

  • Can I print mailing labels with a "The ____ Family" as the name?

    I know how to print mailing labels from my contacts, but I would like to be able to print the labels showing only the last name of the person inserted into "The ___ Family" in life of the full name.  Like The Smith Family rather than Bill Smith.  I was able to do this using outlook and my old PC.  As a new Mac user, I have been unable to figure this one out.  Any help would be much appreciated.

    David Scott9 wrote:
    Pages is a great word processing program, but Numbers is a piece of junk.
    It's a piece of junk fore those which are too dumb to read Numbers User Guide and iWork Formulas and Functions User Guide.
    I used (and continue to use) AppleWorks for years but when I need a new spreadsheet document, I build it in Numbers whose unique drawback is that it's slow.
    Those which took time to search in existing threads know that there are at least two easy ways to create labels with Pages and Numbers.
    (1) my script which is available on my iDisk (address below)
    Download :
    For_iWork:iWork '09:for_Numbers09:for_labels.sparseimage.zip
    (2) https://discussions.apple.com/message/12481761
    Not the peterBreis answer but ElViejo1939's one.
    Yvan KOENIG (VALLAURIS, France) lundi 19 septembre 2011 17:20:26
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

Maybe you are looking for

  • How to change the resolution of a page in iWeb

    Hi, I'm making a website for a project, and I decided to do it in iWeb. The brief of mt project says the resolution has to be 1024*768, however, when I change the resolution to this, the page instantly looks horrible with a white border to the right

  • Corruption of owner admin acct.

    I suddenly became unable to complete opening any of my Adobe software. Re-installing didn't help. I got an error message when trying to install new ISP software that I did not have admin. status. I created a new acct. to which I granted admin. permis

  • Difference in closing Balance qty in Inventory Cube and R3 T-code MB5B

    Dear All In evaluations of the 0OIC_C03 Infocube and corresponding reports in R/3 with transaction MB5B/MB51 suggest incorrect data extraction. The difference is in the initial stoock uploeaded . I found transaction in the PSA of 2LIS_03_BX which are

  • Express 2.0.L.2 -Reply

    We've experienced it in Express 2.0.L.0 and Forte said that it would be fixed in 2.0.L.3 which was supposed to be available around now but we've haven't received it yet. Mark Carruthers 20th Century Fox "Christian Boult" <[email protected]> 07/08/99

  • Help me Enabling SNC tab

    Hi Experts, We have multiple ECC 6.0 Systems where SNC tab is missing in SU01. We need to enable SNC tab in SU01 for ECC 6.0 release. This tab is available in newer versions. Please suggest how can I make the SNC tab available in older or ECC6.0 rele