Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Automatically print attachments from Mail Apps
Having spent hours scouring the Internet for someone who had already solved the problem of how to automatically print attachments from Apple Mail, I found no answers. In my case, the reason I wanted to do this is that I get my faxes sent to my email from an online fax service. I currently use Send2Fax.com, but have used eFax in the past. The faxes are sent to a separate email account I have set up specifically to receive faxes. I then have to open the message, open the attachment, and print. Very redundant. My laziness demanded an easier way.

Here's what I wound up doing to solve the problem:
  1. Created a folder for my faxes: ~/Faxes
  2. Control-clicked on the folder to enable folder actions as explained here.
  3. Saved this script in ~/Library » Scripts » Folder Actions. This is a script that I modified from the OS X folder action script named Image - Duplicate as JPEG.scpt, which you can find on your Mac in the /Library » Scripts » Folder Action Scripts folder.
  4. Attached the above script to the folder using the above instructions.
  5. Saved this script in ~/Library » Scripts » Applications » Mail. This is the script that I modified from this source.
  6. In Apple's Mail, I created a rule, set to "All conditions met," with these criteria:
    • Any Attachment Name - Contains - .pdf
    • Account - myfaxaccount@faxaddress.com
    • Run Applescript - pointing to the script saved in the previous step
At this point, everything worked for me. If you need more help with the process, this entry on my blog contains a more detailed version of the above.

[robg adds: I haven't tested this one. The information above was taken from the linked blog post, though I have reformatted and rewritten pieces of it for easier reading here.]
    •    
  • Currently 3.25 / 5
  You rated: 4 / 5 (4 votes cast)
 
[25,170 views]  

Automatically print attachments from Mail | 10 comments | Create New Account
Click here to return to the 'Automatically print attachments from Mail' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Automatically print attachments from Mail
Authored by: Mr_London on Oct 10, '07 09:10:11AM

been looking for ages for something like this, will be testing this out on 2 machines tomorrow and will report back

Mr_London



[ Reply to This | # ]
Automatically print attachments from Mail
Authored by: jtorrey01 on Oct 10, '07 10:10:12AM

This reminds me of something that I have been thinking about for some time - creating a script to PDF attachments and mail them back. The use case is that at work I use Windows XP with no PDF creation capabilities. I can email the files to my Mac and have them print to PDF and email them back.



[ Reply to This | # ]
Automatically print attachments from Mail
Authored by: ibroughton on Oct 10, '07 01:33:38PM

Well I have a far simpler solution if you are allowed to download software on your XP machine - Free - pdf995.com

Out of interest, how do you get this working to mail the PDF back to you?

---
The server is up but the site is down and I don't know which direction you are trying to go



[ Reply to This | # ]
Automatically print attachments from Mail
Authored by: bjsvec on Oct 10, '07 10:59:22AM

Congratulations, you have gone full circle and reinvented the fax machine..

I always considered one of the main advantages of getting faxes in my email inbox was that I did *not* have to print many faxes. I can read them and then delete, save or forward them just like an email.



[ Reply to This | # ]
Automatically print attachments from Mail
Authored by: prescor on Oct 10, '07 11:53:28AM

This.

What century is this?!



[ Reply to This | # ]
Automatically print attachments from Mail
Authored by: ryanhunt on Oct 17, '07 11:40:13PM

Not printing faxes could be a benefit, but for me the main benefit is not needing a dedicated fax line, and having an 800 number for contractors to send me invoices from all over the state. Plus I can get view them anywhere, and with the above hint I can print to my printer from across the state.

As for not needing them printed out. My accountant wants the hard copy no matter what so it is easiest to do it this way for me.

---
Ryan Hunt
http://www.hunthost.com/
http://www.ryanhunt.info/



[ Reply to This | # ]
Automatically print attachments from Mail
Authored by: Mac Berry on Oct 11, '07 10:48:58AM

He he! The one thing I want to solve in Mail is exactly the oposite - I want it to STOP printing all the attachments whenever I print an e-mail!

Oh well.

I have to ask though, why do you want every fax printed - why not just put them all in a folder (i.e. use half your hint I guess), and view them there? You could always print the ones you specifically need on paper. I'm sure there's a good reason, but I'm just curious.

Mark



[ Reply to This | # ]
Trouble with 2nd script
Authored by: IHateScreenNames on Oct 28, '07 02:24:46PM
When I attempt to save the script i keep getting the following message: Syntax Error Expected "then", etc. but found unknown token. I haven't modified the script in any way and have tried it a few time just to be safe, still no go. Any ideas?

[ Reply to This | # ]
Trouble with 2nd script
Authored by: ryanhunt on Mar 14, '08 12:25:34PM
The problem is that line 45 should read like this:

if (every mail attachment of theMessage) ≠ {} then

the not equal sign is not showing up in the text.

I have placed a copy of the script in script editor format here.

---
Ryan Hunt
http://www.ryanhunt.biz/
http://www.hunthost.com/


[ Reply to This | # ]

Automatically print attachments from Mail
Authored by: rtudor on Dec 10, '09 09:46:49AM

This looks great and just what I'm looking for, we are losing our fax machines shortly (bank of five machine which receive around 150 - 300 faxes a day), due to our new SIP phone system, we will be receiving the faxes via email as you suggest.

I have set this up as per your instructions, but I can't get it to physically print. When a email comes in, it's saving to the designated folder correctly, it's just not printing. I'm getting an error message "/user/bin/lp: Error - unable to access "from" - No such file or directory"

I've changed "property printer_queue : " to point to my printer queue name, other than that this code is as I have downloaded it.

Thanks for any help you can offer.



[ Reply to This | # ]