I'm looking into this as well. I have half of it working. I think I can send a message from my phone and have it work its magic. But the MMS message is formatted a little differently then a standard email and I'd like it to work for th email too (I just haven't had time to troubleshoot this).
Even though I'm not done, to get started, you'll want Pear's Mail MIME class/library. It'll handle the MIME parsing that you'll need to do.
Secondly, you'll need to figure out how to do email redirection with your server. With CPanel, its pretty easy. You can setup an email address to act as a forwarder. You tell it to forward to a PHP script. This script will have the task of reading in the email (from standard IO input) and then parse the MIME contents (where Pear comes in). At this point, your script will have saved the image to where you want it saved.
On top of that, you'll want to sprinkle in some email address validation to make sure you handle images that come from you versus from spam.
I believe there's been some tutorials on how to do this. The one documenting Pear MIME will help, but it doesn't talk much about pulling the email in. There was another tutorial for that, but I don't have a link at the moment...