Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

67952

Suspended
Original poster
Feb 24, 2006
207
210
Hey all,

Does anyone know if there is a Mac app that can scan the Mail app and look for all emails with attachments that are photographs and then automatically save all those photographs to a dedicated folder on the Mac–or better yet, add the automatically to your Photos library?
 

Floris

macrumors 68020
Sep 7, 2007
2,382
1,478
Netherlands
For any new email you get now. Or also that goes back through your whole mail library and process old mails as well?

I think the expected method is that if you want to store a picture from an email attachment, you store it in a folder somewhere. And Photo's app probably automatically gets it from that folder, or you manually add the folder to the list of places to look for stuff.

Other than that, perhaps a service like https://ifttt.com could help? I use it to get instagrams into my dropbox, and email attachments to my google drive, .. etc.
 

dangerfish

macrumors 6502a
Aug 28, 2007
584
133
Yes, you need to set up a mail.app rule. I have an email rule that says any time an email comes to our Sales@ email address with a pdf attachment (this would be a purchase order from a customer), then several things will happen. The mail rule will invoke a Script that will save the pdf to the desktop (which is nothing more than a folder), will automatically print a copy of that pdf on our office printer and will make the computer speak the words "show me the money."
Below is a copy of my script that gets ran every time a pdf is emailed to us. You only need the first part; saving jpg's (or whatever other image files you may want) to a folder that you specify. So you need to write a script and create an email rule. That's it.



using terms from application "Mail"

on perform mail action with messages theMessages for rule theRule

set theOutputFolder to "Macintosh HD:Users:Milly:desktop:"

tell application "Mail"

repeat with theMessage in theMessages

if theMessage's mail attachments is not {} then

repeat with theAttachment in theMessage's mail attachments

set theFileName to theOutputFolder & theAttachment's name

try

save theAttachment in file theFileName

on error errnum

end try

end repeat

end if

end repeat

end tell

tell application "/Users/Milly/Library/Printers/Milly Office Printer.app"

print file theFileName

end tell

say "Show me the money"

end perform mail action with messages

end using terms from
[doublepost=1476360836][/doublepost]Here is what my mail.app rule looks like that runs the script above.
 

Attachments

  • Screen Shot 2016-10-13 at 7.12.09 AM.png
    Screen Shot 2016-10-13 at 7.12.09 AM.png
    60 KB · Views: 168
Last edited:
  • Like
Reactions: rhett7660

rhett7660

macrumors G5
Jan 9, 2008
14,373
4,495
Sunny, Southern California
Yes, you need to set up a mail.app rule. I have an email rule that says any time an email comes to our Sales@ email address with a pdf attachment (this would be a purchase order from a customer), then several things will happen. The mail rule will invoke a Script that will save the pdf to the desktop (which is nothing more than a folder), will automatically print a copy of that pdf on our office printer and will make the computer speak the words "show me the money."
Below is a copy of my script that gets ran every time a pdf is emailed to us. You only need the first part; saving jpg's (or whatever other image files you may want) to a folder that you specify. So you need to write a script and create an email rule. That's it.



using terms from application "Mail"

on perform mail action with messages theMessages for rule theRule

set theOutputFolder to "Macintosh HD:Users:Milly:desktop:"

tell application "Mail"

repeat with theMessage in theMessages

if theMessage's mail attachments is not {} then

repeat with theAttachment in theMessage's mail attachments

set theFileName to theOutputFolder & theAttachment's name

try

save theAttachment in file theFileName

on error errnum

end try

end repeat

end if

end repeat

end tell

tell application "/Users/Milly/Library/Printers/Milly Office Printer.app"

print file theFileName

end tell

say "Show me the money"

end perform mail action with messages

end using terms from
[doublepost=1476360836][/doublepost]Here is what my mail.app rule looks like that runs the script above.

This is pretty cool, didn't know mail was that powerful! Love the "Show me the money" part!!! Nice touch.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.