Mac app that automatically adds pictures in email attachments to Photos app?

67952

Suspended
Original poster
Feb 24, 2006
208
208
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,381
1,451
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
529
111
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

Last edited:
  • Like
Reactions: rhett7660

rhett7660

macrumors G5
Jan 9, 2008
12,223
2,248
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.