Retrieving Images from Emails

Does anyone know of a way to retrieve images from emails and MMS messages? Ideally, I would like to send an MMS message to a designated email address/telephone number and populate a database entry with the image, title, text, date, etc.

Is there a library out there that may handle this already?