Inbound Email
Use Apex to work with email sent to Salesforce.
You can use Apex to receive and process email and attachments. The email is received by the Apex email service, and processed by Apex classes that utilize the InboundEmail object.
The Apex email service is only available in Developer, Enterprise, Unlimited, and Performance Edition organizations.
See Apex Email Service.