+ Start a Discussion
apexdevSunilapexdevSunil 

How to handle the InboundEmail from multiple emails?

Hi

 

I have wriiten an Apex class which makes use of Apex email services.

 

Iam sending an email with attachment to salesforce from xxx@gmail.com. My apex class will strip this attachment from the email and will insert the attachement into an opportunity

 

Now I want the functionality of sending emails with attachments from different email ids like yyy@gmail.com and zz@gmail.com and want to insert the attachments of the email in Opportunity

 

How can I add multiple email_Ids to my email service so that I can send email to salesForce from any email_Id I mention.

 

any help about this is greatly appreciated

 

 

sunil

 

 

aalbertaalbert

You can configure that setting within the Email Service configuration itself. Not in the Apex code.

 

Go to Setup->Develop->Email Services. And click Edit next to the service you want to configure. There is a setting for listing the emails to accept. It is an optional field, but you could specify all gmail accounts by setting it to gmail.com.

 

More information here (see Step 7)